@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
:root {
  --admin-sidebar-width: 260px;
  --admin-header-height: 60px;
  --admin-bg: #f8fafc;
  --admin-sidebar-bg: #1e293b;
  --admin-sidebar-text: #f1f5f9;
  --admin-sidebar-active: #0f766e;
  --admin-card-bg: #ffffff;
  --admin-border: #e2e8f0;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-danger: #991b1b;
  --muted: var(--admin-muted);
  --primary: var(--admin-sidebar-active);
  --border: var(--admin-border);
}
* {
  box-sizing: border-box;
}
body.admin-layout {
  margin: 0;
  padding: 0;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  min-height: 100vh;
}
body.team-login-layout {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(30, 41, 59, 0.12)), #f8fafc;
  color: var(--admin-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body.admin-layout a {
  color: inherit;
}
body.admin-layout button,
body.admin-layout input,
body.admin-layout select,
body.admin-layout textarea,
body.team-login-layout button,
body.team-login-layout input,
body.team-login-layout select,
body.team-login-layout textarea {
  font: inherit;
}
.team-login-shell {
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  align-items: center;
}
.team-login-card {
  width: min(100%, 520px);
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}
.team-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--admin-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.team-login-brand img {
  width: 46px;
  height: auto;
  display: block;
}
.team-login-kicker {
  margin: 0 0 8px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.team-login-card h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  line-height: 1.15;
}
.team-login-copy {
  margin: 0 0 22px;
  color: var(--admin-muted);
}
.team-login-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.team-login-help {
  margin: 14px 0 0;
  color: var(--admin-muted);
  font-size: 0.88rem;
}
.team-login-help a {
  color: #0f766e;
}
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background-color: var(--admin-sidebar-bg);
  color: var(--admin-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-sidebar.open {
  transform: translateX(0);
}
.sidebar-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-header img {
  max-width: 140px;
  filter: brightness(0) invert(1);
}
.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 9px 24px 9px 36px;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  font-size: 0.88rem;
  gap: 10px;
  opacity: 0.82;
}
.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  opacity: 1;
}
.sidebar-link.active {
  background-color: var(--admin-sidebar-active);
  color: #fff;
  font-weight: 600;
  opacity: 1;
}
.sidebar-link-dashboard {
  padding: 12px 20px;
  font-size: 0.9rem;
  opacity: 1;
  font-weight: 600;
}
.nav-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(241, 245, 249, 0.5);
  list-style: none;
  user-select: none;
  transition: color 0.15s;
}
.nav-group summary::-webkit-details-marker {
  display: none;
}
.nav-group summary:hover {
  color: rgba(241, 245, 249, 0.8);
}
.nav-group[open] summary {
  color: rgba(241, 245, 249, 0.9);
}
.nav-group-chevron {
  margin-left: auto;
  font-size: 0.65rem;
  transition: transform 0.2s;
  opacity: 0.5;
}
.nav-group[open] .nav-group-chevron {
  transform: rotate(180deg);
}
.nav-group-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(241, 245, 249, 0.25);
  flex-shrink: 0;
}
.nav-group[open] .nav-group-dot,
.nav-group-has-active .nav-group-dot {
  background: #0f766e;
}
.sidebar-footer {
  padding: 15px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  opacity: 0.7;
}
.admin-main {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.admin-header {
  height: var(--admin-header-height);
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.admin-header-left,
.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-user-actions {
  gap: 15px;
}
.admin-logout-form {
  margin: 0;
}
.admin-breadcrumb {
  font-size: 0.9rem;
  color: var(--admin-muted);
}
.admin-breadcrumb-current {
  color: var(--admin-text);
  font-weight: 500;
}
.admin-content {
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.admin-card {
  background: var(--admin-card-bg);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--admin-border);
  padding: 24px;
  margin-bottom: 24px;
}
.admin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.admin-section-title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 700;
}
.admin-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.45fr);
  gap: 24px;
  align-items: start;
}
.form-grid-2,
.form-grid-3 {
  display: grid;
  gap: 0.75rem;
}
.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-actions-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.admin-actions-inline {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-actions-inline form {
  margin: 0;
}
.admin-table-card {
  padding: 0;
  overflow: hidden;
}
.admin-table-card .admin-section-title {
  padding: 18px 20px 0;
}
.admin-table-card table {
  margin-top: 8px;
}
.admin-empty-cell {
  padding: 34px 20px;
  text-align: center;
  color: #94a3b8;
}
.admin-strong-link {
  color: #334155;
  font-weight: 700;
  text-decoration: none;
}
.admin-strong-link:hover {
  color: #0f766e;
}
.admin-definition-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}
.admin-definition-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.75rem;
}
.admin-definition-list dt {
  color: var(--admin-muted);
  font-weight: 600;
}
.admin-definition-list dd {
  margin: 0;
  font-weight: 700;
}
.admin-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 5px;
  color: var(--admin-text);
}
.admin-subtitle {
  color: var(--admin-muted);
  margin: 0 0 24px;
}
.row,
.row-between {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.row-between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 0.6rem;
}
.inline-form {
  margin: 0;
  display: inline-block;
}
.muted,
.hint,
.helper {
  color: var(--admin-muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  background: #0f766e;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.btn:hover {
  background: #0b5f59;
}
.btn:active {
  transform: translateY(1px);
}
.btn-sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}
.btn-alt,
.btn-light,
.btn-secondary {
  background: #eef2f7;
  color: #1f3b57;
  border-color: #d8dde5;
}
.btn-alt:hover,
.btn-light:hover,
.btn-secondary:hover {
  background: #dde6f1;
}
.btn-danger {
  background: #fee2e2;
  color: var(--admin-danger);
  border-color: #fecaca;
}
.btn-danger:hover {
  background: #fecaca;
}
.field {
  margin-top: 0.75rem;
}
.field label,
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.28rem;
}
.field input,
.field textarea,
.field select,
.form-control,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #94a3b8;
  border-radius: 0;
  padding: 0.4rem 0;
  background: transparent;
  color: var(--admin-text);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}
.field input:hover,
.field textarea:hover,
.field select:hover,
.form-control:hover,
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-bottom-color: #64748b;
}
.field input:focus,
.field textarea:focus,
.field select:focus,
.form-control:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom-color: #0f766e;
  box-shadow: 0 2px 0 0 rgba(15, 118, 110, 0.25);
}
/* Evidenziazione input vuoti */
input.is-empty,
textarea.is-empty,
select.is-empty {
  border-bottom-color: #fca5a5 !important;
  background: rgba(254, 226, 226, 0.22) !important;
}
input.is-empty:focus,
textarea.is-empty:focus,
select.is-empty:focus {
  border-bottom-color: #ef4444 !important;
  box-shadow: 0 2px 0 0 rgba(239, 68, 68, 0.35) !important;
}
.field-inline {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  cursor: pointer;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
th,
td {
  border-bottom: 1px solid var(--admin-border);
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}
th {
  font-size: 0.82rem;
  color: var(--admin-muted);
  font-weight: 700;
}
.alert,
.errors {
  margin-bottom: 1rem;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.alert-success,
.admin-flash-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.alert-danger,
.alert-error,
.admin-flash-error,
.errors {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fda4af;
}
.status-badge,
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-badge.new {
  background: #dbeafe;
  color: #1e40af;
}
.status-badge.incomplete {
  background: #fee2e2;
  color: #991b1b;
}
.status-badge.processing {
  background: #fef3c7;
  color: #92400e;
}
.status-badge.offered {
  background: #ffedd5;
  color: #9a3412;
}
.status-badge.won {
  background: #dcfce7;
  color: #166534;
}
.status-badge.delivered {
  background: #ccfbf1;
  color: #0f766e;
}
.status-badge.lost {
  background: #fee2e2;
  color: #991b1b;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.kpi-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--admin-border);
}
.kpi-label {
  font-size: 0.85rem;
  color: var(--admin-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--admin-text);
}
.admin-flash {
  position: fixed;
  top: 1.1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  min-width: 280px;
  max-width: min(480px, calc(100vw - 2rem));
  border-radius: 14px;
  padding: 0.9rem 1.1rem 0.9rem 1rem;
  font-size: 0.97rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  opacity: 0;
  transition: transform 360ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 260ms ease;
}
.admin-flash.toast-in {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.admin-flash-close {
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  opacity: 0.55;
  font-size: 1rem;
  padding: 0 0 0 0.5rem;
  line-height: 1;
}
.admin-flash-close:hover {
  opacity: 1;
}
.sidebar-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 8px;
  color: var(--admin-text);
  border-radius: 8px;
  transition: background 0.15s;
}
.sidebar-toggle:hover {
  background: #f1f5f9;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open {
  display: block;
}
@media (max-width: 720px) {
  .admin-header {
    padding: 0 14px;
    gap: 10px;
  }
  .admin-breadcrumb {
    display: none;
  }
  .admin-content {
    padding: 18px 12px;
  }
  .admin-user-actions {
    gap: 8px;
  }
  .btn-sm {
    padding: 0.38rem 0.55rem;
  }
  .team-login-shell {
    padding: 16px;
  }
  .team-login-card {
    padding: 22px;
  }
  .team-login-actions .btn {
    width: 100%;
  }
  .field-inline {
    align-items: stretch;
  }
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1024px) {
  .admin-grid-2 {
    grid-template-columns: 1fr;
  }
}
.tutorial-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 26px;
  margin-bottom: 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
  color: #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.tutorial-hero h1,
.tutorial-hero .admin-title {
  margin: 0 0 6px;
  color: #fff;
}
.tutorial-hero p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.55;
}
.tutorial-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.tutorial-principle {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  color: #cbd5e1;
  backdrop-filter: blur(4px);
}
.tutorial-principle strong {
  display: block;
  color: #5eead4;
  margin-bottom: 2px;
}
.tutorial-category {
  margin-bottom: 30px;
}
.tutorial-category__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 11px;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.tutorial-category__title::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.35), #e2e8f0 40%);
}
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 13px;
}
.tutorial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 122px;
  padding: 17px;
  border-top: 3px solid #0f766e;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.tutorial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 118, 110, 0.35);
}
.tutorial-card__eyebrow {
  color: #0f766e !important;
}
.tutorial-card__eyebrow {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tutorial-card__title {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}
.tutorial-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 800px) {
  .tutorial-hero {
    display: block;
  }
  .tutorial-hero .btn {
    margin-top: 16px;
  }
  .tutorial-principles {
    grid-template-columns: 1fr;
  }
}
.guide-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}
.guide-toc {
  position: sticky;
  top: 80px;
  background: var(--admin-card-bg, #fff);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 16px;
}
.guide-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin: 0 0 10px;
}
.guide-toc a {
  display: block;
  font-size: 0.85rem;
  color: #475569;
  text-decoration: none;
  padding: 3px 0;
  border-left: 2px solid transparent;
  padding-left: 8px;
  transition: color 0.15s, border-color 0.15s;
}
.guide-toc a:hover {
  color: #0f172a;
  border-left-color: #0f766e;
}
.guide-toc a.toc-h3 {
  padding-left: 20px;
  font-size: 0.82rem;
}
.guide-content {
  max-width: 720px;
}
.guide-content h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}
.guide-content > h1:not([style]) {
  display: none;
}
.guide-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 10px;
  padding-top: 8px;
  border-top: 1px solid var(--admin-border);
}
.guide-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin: 20px 0 8px;
}
.guide-content p {
  color: #374151;
  line-height: 1.7;
  margin: 0 0 12px;
}
.guide-content ul,
.guide-content ol {
  color: #374151;
  line-height: 1.7;
  margin: 0 0 12px;
  padding-left: 1.4rem;
}
.guide-content li {
  margin-bottom: 4px;
}
.guide-content blockquote {
  border-left: 3px solid #0f766e;
  padding: 10px 16px;
  background: #f0fdf4;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  color: #374151;
}
.guide-content code {
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.88em;
}
.tutorial-review-notes {
  max-width: 752px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid #fbbf24;
  border-left: 5px solid #d97706;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
}
.tutorial-review-notes__head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tutorial-review-notes__badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tutorial-review-notes p {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.5;
}
.tutorial-review-notes ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  line-height: 1.55;
}
@media (max-width: 768px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .guide-toc {
    position: static;
  }
}
.guide-exercises {
  max-width: 752px;
  margin-top: 24px;
}
.guide-exercises > h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
}
.exercise-card {
  background: var(--admin-card-bg, #fff);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.exercise-card:focus-within {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}
.exercise-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}
.exercise-card p {
  font-size: 0.9rem;
  color: #374151;
  margin: 0 0 12px;
}
.exercise-options {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.exercise-options li {
  margin-bottom: 6px;
}
.exercise-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
}
.exercise-options input[type=radio] {
  accent-color: #0f766e;
}
.exercise-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.exercise-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 3px;
}
.exercise-field input[type=text] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--admin-border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.9rem;
}
.exercise-field input.field-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}
.exercise-btn {
  display: inline-block;
  padding: 8px 18px;
  background: #0f766e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.exercise-btn:hover {
  background: #0b5f59;
  transform: translateY(-1px);
}
.exercise-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.exercise-feedback {
  display: none;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
}
.exercise-feedback.ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.exercise-feedback.err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
@media (max-width: 768px) {
  .guide-content {
    padding: 20px 16px !important;
  }
  .exercise-card {
    padding: 16px;
  }
}
.tutorial-sim {
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: linear-gradient(145deg, #f8fafc, #f0fdfa);
}
.tutorial-sim-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.tutorial-sim-heading span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0b5f59;
}
.tutorial-sim-heading h2 {
  margin: 0.15rem 0;
}
.tutorial-sim-heading p {
  margin: 0;
  color: #475569;
}
.tutorial-sim-heading b {
  height: max-content;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: #134e4a;
  font-size: 0.75rem;
  white-space: nowrap;
}
.tutorial-sim-panel {
  padding: 1rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.8rem;
  background: #fff;
}
.tutorial-sim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.tutorial-sim-grid label {
  display: grid;
  gap: 0.35rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}
.tutorial-sim-grid input,
.tutorial-sim-grid select,
.tutorial-sim-grid textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
}
.tutorial-sim-grid em {
  color: #ef4444;
  font-style: normal;
}
.tutorial-sim-grid .wide {
  grid-column: 1/-1;
}
.tutorial-sim-grid .check {
  display: flex;
  align-items: center;
}
.tutorial-sim-grid .check input {
  width: auto;
}
.tutorial-sim-context,
.tutorial-sim-result {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
  border-left: 4px solid #0f766e;
  border-radius: 0.45rem;
  background: #f0fdfa;
}
.tutorial-sim-result {
  margin: 1rem 0 0;
}
.tutorial-sim-result.warning {
  border-color: #d97706;
  background: #fffbeb;
}
.tutorial-sim-actions,
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.tutorial-sim-actions button,
.options button {
  padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.tutorial-sim-actions .primary {
  border-color: #0b5f59;
  background: #0f766e;
  color: #fff;
}
.tutorial-sim-feedback {
  margin: 0.85rem 0 0;
  padding: 0.7rem;
  border-radius: 0.55rem;
  font-weight: 700;
}
.tutorial-sim-feedback--success {
  background: #dcfce7;
  color: #166534;
}
.tutorial-sim-feedback--warning {
  background: #fef3c7;
  color: #92400e;
}
.tutorial-sim-feedback--error {
  background: #fee2e2;
  color: #991b1b;
}
.tutorial-sim-quote {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  border-radius: 0.65rem;
  background: #0f172a;
  color: #fff;
}
.tutorial-sim-quote div {
  display: grid;
}
.tutorial-sim-quote p {
  max-width: 36rem;
  margin: 0;
  color: #cbd5e1;
}
.tutorial-sim-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
.tutorial-sim-workflow button {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}
.tutorial-sim-workflow button:disabled {
  border-color: #86efac;
  background: #f0fdf4;
}
.tutorial-sim-workflow span {
  font-size: 0.72rem;
  color: #64748b;
}
.tutorial-chat {
  max-width: 42rem;
  background: #e5ddd5;
}
.tutorial-chat [data-sim-step] {
  display: grid;
  gap: 0.65rem;
}
.tutorial-chat .bot,
.tutorial-chat .user {
  max-width: 85%;
  padding: 0.7rem;
  border-radius: 0.7rem;
  background: #fff;
}
.tutorial-chat .user {
  justify-self: end;
  background: #dcf8c6;
}
.options button {
  border-color: #5eead4;
  color: #0f766e;
}
.client-sim-selector {
  margin-bottom: 1rem;
}
.client-sim-selector > label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #334155;
}
.client-sim-selector small {
  font-weight: 500;
  color: #64748b;
}
.client-sim-search {
  display: flex;
  gap: 0.5rem;
  align-items: start;
}
.client-sim-search > div {
  position: relative;
  flex: 1;
}
.client-sim-search input,
.client-sim-modal input[type=search] {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
}
.client-sim-search > button,
.client-sim-modal header button,
.client-sim-modal nav button {
  padding: 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.client-sim-results {
  position: absolute;
  z-index: 3;
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.client-sim-result {
  display: grid;
  width: 100%;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.client-sim-result:hover {
  background: #f1f5f9;
}
.client-sim-result span,
.client-sim-empty {
  font-size: 0.76rem;
  color: #64748b;
}
.client-sim-empty {
  margin: 0;
  padding: 0.8rem;
}
.client-sim-selected {
  margin: 0.35rem 0 0;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
}
.client-sim-billing {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #f8fafc;
}
.client-sim-billing h3 {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
}
.client-sim-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  padding: 3vh 1rem;
  background: rgba(15, 23, 42, 0.55);
  overflow: auto;
}
.client-sim-modal-card {
  max-width: 720px;
  margin: auto;
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}
.client-sim-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.client-sim-modal h3 {
  margin: 0;
}
.client-sim-modal nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.client-sim-modal nav button.active {
  border-color: #0f766e;
  background: #f0fdfa;
  color: #0b5f59;
}
.client-sim-modal section {
  padding: 1rem;
}
.client-sim-modal-results {
  display: grid;
  gap: 0.35rem;
  max-height: 350px;
  margin-top: 0.75rem;
  overflow: auto;
}
.client-sim-modal-results .client-sim-result {
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
}
@media (max-width: 900px) {
  .tutorial-sim-grid {
    grid-template-columns: 1fr;
  }
  .tutorial-sim-grid .wide {
    grid-column: auto;
  }
  .tutorial-sim-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tutorial-sim-quote {
    display: grid;
  }
}
@media (max-width: 560px) {
  .tutorial-sim-heading {
    display: grid;
  }
  .tutorial-sim-workflow {
    grid-template-columns: 1fr;
  }
  .client-sim-search {
    display: grid;
  }
  .client-sim-modal nav {
    display: grid;
  }
}
/* ── Tour wrapper ───────────────────────────────────────────────────────── */
.guide-tour-wrap {
  margin-top: 32px;
}
.guide-tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.guide-tour-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.guide-tour-meta {
  font-size: 0.8rem;
  color: #94a3b8;
}
.guide-simulator-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
  color: #075985;
  font-size: 0.85rem;
  line-height: 1.5;
}
.guide-simulator-goal {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 0.83rem;
}
.guide-simulator-goal strong {
  display: block;
  color: #0f172a;
  margin-bottom: 5px;
}
.guide-simulator-goal ol {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}
.guide-simulator-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}
.guide-simulator-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.guide-simulator-secondary:hover,
.guide-simulator-secondary:focus-visible {
  border-color: #0284c7;
  color: #0369a1;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}
.guide-simulator-reset {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff;
}
.guide-simulator-reset:hover,
.guide-simulator-reset:focus-visible {
  border-color: #ef4444;
  color: #991b1b;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.guide-simulator-actions .guide-tour-start-btn {
  margin-left: 4px;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}
.guide-simulator-actions .guide-tour-start-btn:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 2px;
}
.guide-tour-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #0f766e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.guide-tour-start-btn:hover {
  background: #0d6460;
}
/* ── Tooltip ────────────────────────────────────────────────────────────── */
.guide-tour-tooltip {
  position: fixed;
  z-index: 9999;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: none;
  pointer-events: auto;
}
.guide-tour-tooltip__counter {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
}
.guide-tour-tooltip__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}
.guide-tour-tooltip__body {
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.6;
  margin: 0 0 14px;
}
.guide-tour-tooltip__body strong {
  color: #0f172a;
}
.guide-tour-tooltip__body em {
  color: #0f766e;
  font-style: normal;
  font-weight: 600;
}
.guide-tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.guide-tour-nav__prev {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.guide-tour-nav__prev:hover {
  border-color: #94a3b8;
  color: #0f172a;
}
.guide-tour-nav__prev:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.guide-tour-nav__next {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.guide-tour-nav__next:hover {
  background: #0d6460;
}
.guide-tour-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 5px;
  line-height: 1;
}
.guide-tour-close:hover {
  color: #0f172a;
}
/* ── Tip button (per-step help button) ──────────────────────────────────── */
.guide-tour-tip-btn {
  width: max-content;
  min-height: 28px;
  margin: 0 0 8px auto;
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.guide-tour-tip-btn::after {
  content: "Aiuto";
}
.guide-tour-tip-btn:hover,
.guide-tour-tip-btn:focus-visible {
  background: #ccfbf1;
  border-color: #0f766e;
  color: #0d5f59;
}
.guide-tour-form-inner .form-grid-3[data-tour-step] > .guide-tour-tip-btn {
  grid-column: 1 / -1;
  justify-self: end;
  margin-bottom: 0;
}
.guide-tour-form-inner .field[data-tour-step] > .guide-tour-tip-btn {
  margin-bottom: 4px;
}
.guide-tour-form-wrap .action-bar-clone {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.guide-tour-form-wrap .action-bar-clone .guide-tour-tip-btn {
  grid-column: 1;
  justify-self: start;
  margin: 0;
}
.guide-tour-form-wrap .action-bar-clone .btn-clone-primary {
  grid-column: 2;
}
/* ── Highlight ──────────────────────────────────────────────────────────── */
.guide-tour-highlight {
  position: relative;
  z-index: 9990;
  outline: 3px solid #0f766e !important;
  outline-offset: 4px;
  border-radius: 4px;
  box-shadow: 0 0 0 8px rgba(15, 118, 110, 0.12) !important;
  transition: outline 0.2s, box-shadow 0.2s;
}
/* ── Backdrop ───────────────────────────────────────────────────────────── */
.guide-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9980;
  background: rgba(10, 20, 40, 0.45);
  display: none;
}
/* ── Form clone container ───────────────────────────────────────────────── */
.guide-tour-form-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  padding: 0;
  position: relative;
  z-index: 1;
}
.guide-tour-form-inner {
  padding: 16px 20px 24px;
}
.guide-tour-form-inner *:focus {
  outline: none !important;
}
/* Scoped preventivo form styles */
.guide-tour-form-inner .form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.guide-tour-form-inner .form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.guide-tour-form-inner .field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.guide-tour-form-inner .field input,
.guide-tour-form-inner .field select,
.guide-tour-form-inner .field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 2px solid #94a3b8;
  border-radius: 0;
  background: transparent;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  pointer-events: auto;
}
.guide-tour-form-inner .field input:focus,
.guide-tour-form-inner .field select:focus,
.guide-tour-form-inner .field textarea:focus {
  border-bottom-color: #0f766e;
}
.guide-tour-form-inner .field input[readonly] {
  color: #475569;
  background: #f8fafc;
  cursor: not-allowed;
}
.guide-tour-form-inner .field {
  margin-bottom: 0;
}
/* Section blocks */
.guide-tour-form-inner .status-section {
  margin: 0 0 12px;
  border-radius: 10px;
  border: 2px solid #3b82f6;
  background: rgba(59, 130, 246, 0.04);
  padding: 0.9rem 1rem;
  position: relative;
}
.guide-tour-form-inner .status-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3b82f6;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-tour-form-inner .status-section h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
}
.guide-tour-form-inner .status-select {
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 3px solid #3b82f6 !important;
  color: #3b82f6;
}
.guide-tour-form-inner .section-block {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.6);
  padding: 0.85rem 0.9rem 0.95rem;
  margin-bottom: 12px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.8);
}
.guide-tour-form-inner .section-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.guide-tour-form-inner .customer-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.guide-tour-form-inner .customer-col {
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.3);
  padding: 10px;
}
.guide-tour-form-inner .customer-col h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
}
.guide-tour-form-inner .vehicle-block {
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.02));
  padding: 0.85rem 0.9rem;
  margin-bottom: 12px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.8);
}
.guide-tour-form-inner .vehicle-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}
.guide-tour-form-inner .vehicle-found-panel {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  font-size: 0.85rem;
}
.guide-tour-form-inner .vehicle-found-panel strong {
  color: #0f766e;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}
.guide-tour-form-inner .vehicle-found-grid {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 4px 18px;
}
.guide-tour-form-inner .vehicle-found-grid span {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
}
.guide-tour-form-inner .vehicle-found-grid b {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}
.guide-tour-form-inner .product-panel {
  border: 1px solid rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.4);
  padding: 8px;
  margin-bottom: 12px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.7);
}
.guide-tour-form-inner .product-panel h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.guide-tour-form-inner .product-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 6px;
}
.guide-tour-form-inner .product-grid-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  padding: 4px 6px;
  border-bottom: 1px solid #e2e8f0;
}
.guide-tour-form-inner .product-grid-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #0f172a;
}
.guide-tour-form-inner .product-grid-table tr:last-child td {
  border-bottom: none;
}
.guide-tour-form-inner .product-grid-table input[type="text"],
.guide-tour-form-inner .product-grid-table input[type="number"] {
  width: 100%;
  min-width: 54px;
  box-sizing: border-box;
  padding: 5px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  font-size: 0.8rem;
}
.guide-tour-form-inner .product-grid-table input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18) !important;
  border-color: #0f766e;
}
.guide-tour-form-inner .product-grid-scroll {
  overflow-x: auto;
}
.guide-tour-wrap[data-sim-customer-type="private"] .sim-mechanic-col {
  background: #faf5ff;
  color: #6b21a8;
}
.guide-tour-wrap[data-sim-customer-type="private"] .sim-customer-col {
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
}
.guide-tour-wrap[data-sim-customer-type="mechanic"] .sim-mechanic-col {
  background: #faf5ff;
  color: #6b21a8;
  font-weight: 700;
}
.guide-tour-wrap[data-sim-customer-type="mechanic"] .sim-customer-col {
  background: #f8fafc;
  color: #64748b;
}
.guide-tour-form-inner .product-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.guide-tour-form-inner .markup-fields {
  display: flex;
  gap: 16px;
  align-items: center;
}
.guide-tour-form-inner .markup-field {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
}
.guide-tour-form-inner .markup-field input {
  width: 56px;
  padding: 3px 6px;
  font-size: 12px;
  border: 1px solid #ccc !important;
  border-bottom: 1px solid #ccc !important;
  border-radius: 4px;
  text-align: right;
}
.guide-tour-form-inner .totals-section {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.6);
  padding: 0.85rem 0.9rem;
  margin-bottom: 12px;
}
.guide-tour-form-inner .totals-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.guide-tour-form-inner .totals-section input[readonly] {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.guide-tour-form-wrap .action-bar-clone {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 16px;
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.08);
  border-radius: 0 0 12px 12px;
}
.guide-tour-form-wrap .btn-clone-primary {
  padding: 10px 32px;
  background: #0f766e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.guide-tour-form-wrap .btn-clone-primary:hover {
  background: #0d6460;
}
.guide-tour-form-inner .search-field {
  display: flex;
  gap: 6px;
  align-items: center;
}
.guide-tour-form-inner .search-input {
  flex: 1;
  border: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 0.85rem !important;
  color: #94a3b8 !important;
}
.guide-tour-form-inner .chip-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(19, 34, 55, 0.18);
  border-radius: 6px;
  background: #fff;
  font-size: 0.78rem;
  color: #64748b;
  cursor: pointer;
}
.guide-tour-form-inner .chip-btn:hover {
  border-color: #0f766e;
  color: #0f766e;
}
.guide-tour-form-inner .chip-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.guide-tour-form-inner .selected-label {
  font-size: 0.82rem;
  color: #0f766e;
  font-weight: 600;
  margin-top: 4px;
}
.guide-simulator-feedback {
  grid-column: 3;
  justify-self: end;
  max-width: 430px;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.guide-simulator-feedback.is-info {
  background: #eff6ff;
  color: #0f766e;
}
.guide-simulator-feedback.is-success {
  background: #f0fdf4;
  color: #166534;
}
.guide-simulator-feedback.is-error {
  background: #fef2f2;
  color: #991b1b;
}
@media (max-width: 960px) {
  .guide-tour-form-inner .customer-split {
    grid-template-columns: 1fr;
  }
  .guide-tour-form-inner .vehicle-found-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-tour-form-inner .markup-fields {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 640px) {
  .guide-tour-form-inner .customer-split {
    grid-template-columns: 1fr;
  }
  .guide-tour-form-inner .form-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .guide-tour-form-inner .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .guide-tour-form-inner {
    padding: 12px;
  }
  .guide-tour-header {
    align-items: flex-start;
  }
  .guide-simulator-actions {
    width: 100%;
  }
  .guide-simulator-actions > button {
    flex: 1 1 auto;
    justify-content: center;
  }
  .guide-tour-tooltip {
    width: calc(100vw - 24px);
  }
  .guide-tour-form-wrap .action-bar-clone {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .guide-tour-form-wrap .action-bar-clone .guide-tour-tip-btn,
  .guide-tour-form-wrap .action-bar-clone .btn-clone-primary {
    grid-column: 1;
    justify-self: center;
  }
  .guide-simulator-feedback {
    grid-column: 1;
    justify-self: stretch;
    max-width: none;
  }
}
/* ============================================================
   Catalogo TecDoc (/admin/tecdoc)
   ============================================================ */
.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.tecdoc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tecdoc-tab {
  border: 1px solid var(--admin-border);
  background: var(--admin-card-bg);
  color: var(--admin-text);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.tecdoc-tab:hover {
  border-color: var(--admin-sidebar-active);
}
.tecdoc-tab.active {
  background: var(--admin-sidebar-active);
  border-color: var(--admin-sidebar-active);
  color: #fff;
}
.tecdoc-hint {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
}
.tecdoc-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.tecdoc-inline-form .field {
  margin: 0;
  min-width: 180px;
  flex: 1 1 180px;
}
.tecdoc-inline-form .btn {
  flex: 0 0 auto;
}
.tecdoc-category-field {
  margin-top: 1rem;
}
.tecdoc-result {
  margin-top: 1rem;
}
.tecdoc-result:empty {
  display: none;
}
.tecdoc-loading {
  color: var(--admin-muted);
  font-size: 0.85rem;
}
.tecdoc-error {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fda4af;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
}
/* Banner esito verifica */
.tecdoc-banner {
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.tecdoc-banner.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.tecdoc-banner.ko {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fda4af;
}
.tecdoc-banner.miss {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}
/* Scheda dettagli veicolo */
.tecdoc-vehicle-card {
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: #f8fafc;
}
.tecdoc-vehicle-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.tecdoc-vehicle-card .tecdoc-vehicle-id {
  font-size: 0.8rem;
  color: var(--admin-muted);
  margin-bottom: 0.6rem;
}
.tecdoc-vehicle-card .tecdoc-vehicle-id code {
  font-weight: 700;
  color: var(--admin-text);
}
.tecdoc-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.45rem 1rem;
  margin: 0.6rem 0 0;
}
.tecdoc-spec-grid div {
  font-size: 0.85rem;
}
.tecdoc-spec-grid div dt {
  color: var(--admin-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.tecdoc-spec-grid div dd {
  margin: 0;
  font-weight: 600;
}
.tecdoc-vehicle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
/* Griglia articoli */
.tecdoc-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.tecdoc-article-card {
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.7rem;
  background: var(--admin-card-bg);
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}
.tecdoc-article-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
  flex: 0 0 auto;
}
.tecdoc-article-card .tecdoc-article-name {
  font-weight: 600;
  font-size: 0.87rem;
}
.tecdoc-article-card .tecdoc-article-no {
  font-size: 0.8rem;
  color: var(--admin-muted);
}
.tecdoc-article-card .tecdoc-article-no code {
  color: var(--admin-text);
}
.tecdoc-article-card .tecdoc-article-supplier {
  font-size: 0.78rem;
  color: var(--admin-muted);
}
.tecdoc-article-card .btn {
  margin-top: 0.4rem;
}
/* Dettaglio fornitori nella verifica */
.tecdoc-supplier-row {
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  background: var(--admin-card-bg);
}
.tecdoc-supplier-row summary {
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.88rem;
}
.tecdoc-supplier-row .tecdoc-supplier-cars {
  padding: 0 0.85rem 0.75rem;
  font-size: 0.82rem;
  max-height: 280px;
  overflow: auto;
}
.tecdoc-supplier-row .tecdoc-supplier-cars li {
  padding: 0.18rem 0.3rem;
  border-radius: 6px;
}
.tecdoc-supplier-row .tecdoc-supplier-cars li.match {
  background: #ecfdf5;
  font-weight: 700;
}
/* Badge tipo ricerca in cronologia */
.tecdoc-type-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.tecdoc-type-badge.tecdoc-type-veicolo {
  background: #eff6ff;
  color: #1d4ed8;
}
.tecdoc-type-badge.tecdoc-type-articolo {
  background: #f5f3ff;
  color: #6d28d9;
}
.tecdoc-type-badge.tecdoc-type-compatibilita {
  background: #ecfeff;
  color: #0e7490;
}
.tecdoc-type-badge.tecdoc-type-verifica {
  background: #ecfdf5;
  color: #065f46;
}
.tecdoc-query {
  word-break: break-word;
}
@media (max-width: 720px) {
  .tecdoc-inline-form .field {
    flex-basis: 100%;
  }
  .tecdoc-inline-form .btn {
    width: 100%;
  }
}
/* Archivio locale TecDoc */
.tecdoc-archive-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.tecdoc-archive-head .tecdoc-hint {
  max-width: 60ch;
}
.tecdoc-archive-grid {
  margin-top: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
/* Gestionale Contabilità: prima nota, acquisti, abbonamenti */
.movimento-entrata {
  color: #047857;
  font-weight: 700;
}
.movimento-uscita {
  color: #b91c1c;
  font-weight: 700;
}
/* Twemoji: le emoji sostituite con SVG devono seguire la riga di testo */
img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 0.07em;
  vertical-align: -0.125em;
  display: inline-block;
}
/* Cruscotto contabilità: grafico cassa e categorie */
.cashflow-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 170px;
  padding-top: 6px;
}
.cashflow-month {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
}
.cashflow-bars {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}
.cashflow-bars span {
  width: 9px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.cashflow-bars .bar-in {
  background: #0f766e;
}
.cashflow-bars .bar-out {
  background: #f59e0b;
}
.cashflow-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--admin-muted);
  text-transform: uppercase;
}
.cashflow-legend {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--admin-muted);
}
.cashflow-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 4px;
}
.cashflow-legend .dot-in {
  background: #0f766e;
}
.cashflow-legend .dot-out {
  background: #f59e0b;
}
.category-bars {
  display: grid;
  gap: 0.75rem;
}
.category-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
.category-head b {
  color: #0f766e;
}
.category-track {
  height: 8px;
  background: #eef2f5;
  border-radius: 4px;
  overflow: hidden;
}
.category-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  border-radius: 4px;
}
/* ── Simulatore provvigioni (Contabilità) ───────────────────────────────── */
.commission-sim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.commission-sim-head h2 {
  margin: 0;
  font-size: 1rem;
}
.commission-sim-head p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
}
.commission-sim-card {
  margin-bottom: 16px;
}
.commission-sim-card .commission-sim-head {
  padding: 18px 20px 0;
}
.commission-sim-card table {
  margin-top: 8px;
}
.commission-sim-card td input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
}
.commission-sim-card td input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: #0f766e;
}
.commission-sim-num {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}
.commission-sim-remove {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.3rem;
}
.commission-sim-remove:hover {
  color: #b91c1c;
}
.commission-sim-kpis small {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
}
.commission-sim-kpis .kpi-value.is-negative {
  color: #b91c1c;
}
.commission-sim-quick-result {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f766e;
  padding: 0.35rem 0;
}
