/* ============================================
   SPEDIAMOPRO — CENTRO ASSISTENZA (FINALE)
   ============================================ */

:root {
  --sp-navy:       #0F1B3D;
  --sp-blue:       #1E40AF;
  --sp-cream:      #FBF7EE;
  --sp-green-dk:   #0F3D3A;
  --sp-green-lt:   #5DCAA5;
  --sp-text:       #0F1B3D;
  --sp-text-mute:  #64748B;
  --sp-border:     #E5E7EB;
  --sp-radius:     12px;
  --sp-radius-lg:  18px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--sp-text);
  background: #fff;
  margin: 0;
}

a { color: var(--sp-blue); }

/* HEADER ===================================== */
.header {
  border-bottom: 1px solid var(--sp-border);
  background: #fff;
  padding: 16px 0;
}
.header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header .logo img {
  max-height: 40px;
  width: auto;
  display: block;
}
.header-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.header-nav a {
  color: var(--sp-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.header-nav a:hover {
  color: var(--sp-blue);
}

/* HERO ======================================= */
.sp-hero {
  position: relative;
  min-height: 480px;
  padding: 110px 24px 130px;
  overflow: hidden;
  background: var(--sp-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://spediamopro.net/wp-content/uploads/2026/02/IgniyAsqWC94bFkHOyi1F_gbA2Ah6T.png');
  background-size: cover;
  background-position: center center;
  z-index: 1;
}
.sp-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,27,61,0.20) 0%, rgba(15,27,61,0.55) 100%);
}
.sp-hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.sp-hero__title {
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 22px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* SEARCH BAR ================================= */
.sp-hero form,
.sp-hero .search,
.sp-hero .search-full {
  position: relative;
  margin: 0 auto;
  display: block;
  max-width: 600px;
}
.sp-hero label,
.sp-hero .search-full > span,
.sp-hero form > span {
  display: none !important;
}
.sp-hero input[type="search"],
.sp-hero input[type="text"] {
  width: 100%;
  height: 64px;
  padding: 0 76px 0 28px;
  border-radius: 999px;
  border: none;
  background: #fff;
  font-size: 16px;
  color: var(--sp-text);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  outline: none;
  box-sizing: border-box;
}
.sp-hero input::placeholder { color: #94A3B8; }

/* Nascondi i bottoni reali della search */
.sp-hero .search button,
.sp-hero .search-full button,
.sp-hero form button,
.sp-hero input[type="submit"],
.sp-hero button:not([type]),
.sp-hero [role="button"]:not(.sp-cat-card) {
  display: none !important;
}
.sp-hero .search > *:not(input):not(label),
.sp-hero .search-full > *:not(input):not(label),
.sp-hero form > *:not(input):not(label) {
  display: none !important;
}

/* Bottone freccia visivo (pseudo-elemento) */
.sp-hero form::after,
.sp-hero .search::after,
.sp-hero .search-full::after {
  content: "→";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sp-blue);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

/* CATEGORIE GRID ============================= */
/* CATEGORIE GRID — layout 3+2 ================ */
.sp-categories-wrap {
  background: var(--sp-cream);
  margin: -50px auto 0;
  border-radius: var(--sp-radius-lg);
  padding: 22px;
  position: relative;
  z-index: 3;
  max-width: 1100px;
  width: calc(100% - 48px);
  box-sizing: border-box;
}
.sp-categories {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* Layout: prima riga 3 card (span 2 ciascuna), seconda riga 2 card (span 3 ciascuna) */
.sp-cat-card {
  grid-column: span 2;
  display: flex;
  align-items: flex-end;
  min-height: 170px;
  padding: 28px 26px;
  border-radius: var(--sp-radius);
  text-decoration: none !important;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.sp-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15,27,61,0.20);
}

/* Quando ci sono 5 card → 3 sopra + 2 sotto (le ultime 2 più larghe) */
.sp-categories:has(.sp-cat-card:nth-child(5):last-child) .sp-cat-card:nth-child(4),
.sp-categories:has(.sp-cat-card:nth-child(5):last-child) .sp-cat-card:nth-child(5) {
  grid-column: span 3;
}

/* Quando ci sono 4 card → 2 sopra + 2 sotto */
.sp-categories:has(.sp-cat-card:nth-child(4):last-child) .sp-cat-card {
  grid-column: span 3;
}

/* Quando ci sono 2 card → entrambe larghe */
.sp-categories:has(.sp-cat-card:nth-child(2):last-child) .sp-cat-card {
  grid-column: span 3;
}

/* COLORI BRAND SPEDIAMOPRO ==================== */
.sp-cat-card:nth-child(1) {
  background: #0F1B3D;       /* Navy primario */
  color: #fff;
}
.sp-cat-card:nth-child(2) {
  background: #F39200;       /* Arancione brand */
  color: #0F1B3D;
}
.sp-cat-card:nth-child(3) {
  background: #1E40AF;       /* Blu medio */
  color: #fff;
}
.sp-cat-card:nth-child(4) {
  background: #FBF0DC;       /* Crema accentuato */
  color: #0F1B3D;
  border: 2px solid #0F1B3D;
}
.sp-cat-card:nth-child(5) {
  background: #2D5F5D;       /* Verde acqua scuro */
  color: #fff;
}

/* Mobile: tutte le card a piena larghezza */
@media (max-width: 768px) {
  .sp-categories {
    grid-template-columns: 1fr;
  }
  .sp-cat-card,
  .sp-categories .sp-cat-card {
    grid-column: span 1 !important;
    min-height: 130px;
  }
}
/* PROMOTED ARTICLES ========================== */
.sp-promoted {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 24px;
}
.sp-promoted h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--sp-text);
}
.sp-promoted ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 0;
}
.sp-promoted li a {
  display: block;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  color: var(--sp-text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.sp-promoted li a:hover {
  border-color: var(--sp-blue);
  transform: translateX(4px);
}

/* BREADCRUMB ================================= */
.sp-breadcrumbs {
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--sp-text-mute);
}
.sp-breadcrumbs ol,
.sp-breadcrumbs ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sp-breadcrumbs li::before { display: none; }
.sp-breadcrumbs li + li::before {
  content: "›";
  display: inline-block;
  color: var(--sp-text-mute);
}
.sp-breadcrumbs a {
  color: var(--sp-text-mute);
  text-decoration: none;
}
.sp-breadcrumbs a:hover { color: var(--sp-blue); }

/* LAYOUT 2 COLONNE =========================== */
.sp-layout {
  max-width: 1100px;
  margin: 30px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
}
.sp-layout--single {
  grid-template-columns: 1fr;
  max-width: 900px;
}
@media (max-width: 768px) {
  .sp-layout { grid-template-columns: 1fr; }
}

/* SIDEBAR ==================================== */
.sp-sidebar {
  background: var(--sp-cream);
  border-radius: var(--sp-radius);
  padding: 20px;
  align-self: start;
}
.sp-sidebar details {
  border-bottom: 1px solid rgba(15,27,61,0.08);
  padding: 12px 0;
}
.sp-sidebar details:last-child { border-bottom: none; }
.sp-sidebar summary {
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sp-sidebar summary::-webkit-details-marker { display: none; }
.sp-sidebar summary::after {
  content: "▸";
  font-size: 11px;
  transition: transform 0.2s;
}
.sp-sidebar details[open] summary::after { transform: rotate(90deg); }
.sp-sidebar ul {
  list-style: none;
  padding: 10px 0 0;
  margin: 0;
}
.sp-sidebar ul a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: var(--sp-text-mute);
  text-decoration: none;
}
.sp-sidebar ul a:hover { color: var(--sp-blue); }

/* SIDEBAR ARTICOLO =========================== */
.sp-sidebar-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--sp-navy);
  margin: 0 0 12px;
}
.sp-sidebar-articles {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sp-sidebar-articles li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(15,27,61,0.06);
}
.sp-sidebar-articles li:last-child { border-bottom: none; }
.sp-sidebar-articles a {
  color: var(--sp-text-mute);
  text-decoration: none;
  font-size: 13px;
  display: block;
  line-height: 1.4;
}
.sp-sidebar-articles a:hover { color: var(--sp-blue); }
.sp-sidebar-articles a.is-active {
  color: var(--sp-blue);
  font-weight: 600;
}

/* MAIN CONTENT =============================== */
.sp-main h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
}
.sp-main .sp-cat-desc {
  color: var(--sp-text-mute);
  margin: 0 0 28px;
  font-size: 15px;
}
.sp-section { margin-bottom: 40px; }
.sp-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sp-border);
}
.sp-articles {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sp-articles li {
  border-bottom: 1px solid var(--sp-border);
}
.sp-articles a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4px;
  text-decoration: none;
  color: var(--sp-text);
  font-size: 15px;
  font-weight: 500;
  transition: padding 0.2s, color 0.15s;
}
.sp-articles a:hover {
  color: var(--sp-blue);
  padding-left: 8px;
}
.sp-articles .sp-chev {
  color: var(--sp-text-mute);
  font-size: 16px;
}

/* PAGINA ARTICOLO ============================ */
.sp-article-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sp-border);
}
.sp-article-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--sp-navy);
  line-height: 1.2;
}
.sp-article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--sp-text-mute);
}
.sp-article-author {
  font-weight: 500;
  color: var(--sp-text);
}
.sp-article-body {
  font-size: 16px;
  line-height: 1.7;
  color: #1F2937;
}
.sp-article-body p { margin: 0 0 16px; }
.sp-article-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--sp-navy);
}
.sp-article-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--sp-navy);
}
.sp-article-body a {
  color: var(--sp-blue);
  text-decoration: underline;
}
.sp-article-body ul,
.sp-article-body ol {
  padding-left: 24px;
  margin: 0 0 16px;
}
.sp-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}
.sp-article-body code {
  background: var(--sp-cream);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Menlo', monospace;
}
.sp-article-body blockquote {
  border-left: 4px solid var(--sp-blue);
  padding: 8px 16px;
  margin: 16px 0;
  background: var(--sp-cream);
  color: var(--sp-text-mute);
}

/* FOOTER ===================================== */
/* FOOTER SPEDIAMOPRO ========================= */
.sp-footer {
  background: #fff;
  color: var(--sp-navy);
  margin-top: 80px;
  border-top: 1px solid var(--sp-border);
  padding: 60px 24px 0;
  font-size: 14px;
}

.sp-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 50px;
  padding-bottom: 50px;
}

@media (max-width: 980px) {
  .sp-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}
@media (max-width: 600px) {
  .sp-footer__inner { grid-template-columns: 1fr; }
}

/* COLONNA BRAND */
.sp-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sp-footer__logo {
  max-width: 160px;
  height: auto;
}
.sp-footer__legal-text {
  font-size: 13px;
  color: var(--sp-text);
  margin: 0;
  line-height: 1.5;
}
.sp-footer__contacts {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sp-footer__contacts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--sp-text);
}
.sp-footer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F39200;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
}
.sp-footer__contacts a {
  color: var(--sp-navy);
  text-decoration: none;
}
.sp-footer__contacts a:hover {
  color: #F39200;
}

/* COLONNE LINK */
.sp-footer__col h4 {
  color: var(--sp-text-mute);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sp-border);
}
.sp-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sp-footer__links a {
  color: var(--sp-navy);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s;
}
.sp-footer__links a:hover {
  color: #F39200;
}

/* COLONNA PAGAMENTI + CTA */
.sp-footer__payments {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.sp-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--sp-navy);
  letter-spacing: 0.5px;
}
.sp-footer__cta-title {
  border-bottom: 1px solid var(--sp-border);
  margin-bottom: 16px;
}
.sp-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #F39200;
  color: #fff !important;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.sp-footer__cta:hover {
  background: #D97F00;
  transform: translateY(-1px);
}
.sp-footer__cta svg { display: inline-block; }

/* RIGA INFERIORE */
.sp-footer__bottom {
  border-top: 1px solid var(--sp-border);
  padding: 24px 0;
}
.sp-footer__bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 768px) {
  .sp-footer__bottom-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
  }
}

.sp-footer__social-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sp-footer__social-title {
  margin: 0;
  font-size: 14px;
  color: var(--sp-text);
  font-weight: 500;
}
.sp-footer__social {
  display: flex;
  gap: 14px;
}
@media (max-width: 768px) {
  .sp-footer__social { justify-content: center; }
}
.sp-footer__social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sp-navy);
  text-decoration: none;
  transition: color 0.15s, transform 0.2s;
}
.sp-footer__social a:hover {
  color: #F39200;
  transform: translateY(-2px);
}

.sp-footer__copyright {
  margin: 0;
  font-size: 13px;
  color: var(--sp-text-mute);
  text-align: center;
}

.sp-footer__legal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .sp-footer__legal { justify-content: center; }
}
.sp-footer__legal a {
  color: var(--sp-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.sp-footer__legal a:hover { color: #F39200; }
/* CLEANUP elementi residui =================== */
body > a:not([class]),
body > .moock-ltd-link {
  display: none;
}
/* ============================================
   RESPONSIVE FIXES — DESKTOP / TABLET / MOBILE
   ============================================ */

/* TABLET (768-1024px) ======================== */
@media (max-width: 1024px) {
  .header .container {
    padding: 0 20px;
    gap: 16px;
  }
  .header-nav { gap: 18px; }
  .header-nav a { font-size: 13px; }
}

/* TABLET PICCOLO (max 768px) ================= */
@media (max-width: 768px) {

  /* HEADER → menu hamburger semplificato */
  .header .container {
    flex-wrap: wrap;
    padding: 0 16px;
    gap: 12px;
  }
  .header .logo img {
    max-height: 32px;
  }
  .header-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--sp-border);
  }
  .header-nav a {
    font-size: 13px;
    padding: 4px 0;
  }

  /* HERO → meno padding, testo più piccolo */
  .sp-hero {
    min-height: 380px;
    padding: 60px 16px 90px;
  }
  .sp-hero__title {
    font-size: 18px;
    margin-bottom: 18px;
  }
  .sp-hero input[type="search"],
  .sp-hero input[type="text"] {
    height: 56px;
    font-size: 15px;
    padding: 0 64px 0 22px;
  }
  .sp-hero form::after,
  .sp-hero .search::after,
  .sp-hero .search-full::after {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  /* CATEGORIE → tutte stesso layout su mobile */
  .sp-categories-wrap {
    margin: -40px 12px 0;
    padding: 14px;
    border-radius: 14px;
    width: auto;
  }
  .sp-categories {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .sp-cat-card,
  .sp-categories .sp-cat-card {
    grid-column: span 1 !important;
    min-height: 110px;
    padding: 22px 20px;
    font-size: 15px;
  }

  /* PROMOTED → 1 colonna */
  .sp-promoted {
    margin: 40px auto;
    padding: 0 16px;
  }
  .sp-promoted ul {
    grid-template-columns: 1fr;
  }

  /* LAYOUT 2 COLONNE → stack */
  .sp-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
    margin: 20px auto 40px;
  }
  .sp-sidebar {
    padding: 16px;
    position: relative;
    top: 0;
  }
  .sp-breadcrumbs {
    padding: 0 16px;
    font-size: 12px;
  }

  /* PAGINA ARTICOLO */
  .sp-article-header h1 {
    font-size: 24px;
  }
  .sp-article-body {
    font-size: 15px;
  }
  .sp-article-body h2 {
    font-size: 20px;
  }
  .sp-main h1 { font-size: 22px; }
  .sp-section h2 { font-size: 18px; }
  .sp-articles a {
    padding: 14px 4px;
    font-size: 14px;
  }

  /* FOOTER → bottom impilato e centrato */
  .sp-footer {
    padding: 40px 16px 0;
  }
  .sp-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 32px;
  }
  .sp-footer__bottom-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }
  .sp-footer__legal {
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .sp-footer__social { justify-content: center; }
  .sp-footer__cta { justify-content: center; }
}

/* MOBILE PICCOLO (max 480px) ================= */
@media (max-width: 480px) {

  .header-nav a:nth-child(2) {
    /* nasconde "Sito" su schermi piccolissimi se troppo stretto */
    display: none;
  }

  .sp-hero {
    min-height: 340px;
    padding: 50px 12px 80px;
  }
  .sp-hero__title {
    font-size: 16px;
  }
  .sp-hero input[type="search"],
  .sp-hero input[type="text"] {
    height: 52px;
    font-size: 14px;
  }

  .sp-categories-wrap {
    margin: -32px 8px 0;
  }

  .sp-cat-card {
    min-height: 90px;
    padding: 18px 16px;
    font-size: 14px;
  }

  .sp-article-header h1 {
    font-size: 20px;
  }

  .sp-footer__cta {
    width: 100%;
    justify-content: center;
  }
  .sp-footer__legal {
    flex-direction: column;
    gap: 8px;
  }
}

/* TOUCH OPTIMIZATIONS ======================== */
@media (hover: none) {
  /* su mobile non far "muovere" gli elementi al tap */
  .sp-cat-card:hover,
  .sp-promoted li a:hover,
  .sp-articles a:hover,
  .sp-footer__cta:hover,
  .sp-footer__social a:hover {
    transform: none;
  }
}
/* PAGINA RICHIESTA / FORM ==================== */
.sp-request-page {
  max-width: 720px;
  margin: 0 auto;
}

.sp-request-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sp-border);
}
.sp-request-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--sp-navy);
}
.sp-request-subtitle {
  font-size: 15px;
  color: var(--sp-text-mute);
  margin: 0;
}

/* FORM CONTAINER */
.sp-request-form,
.request-form {
  background: var(--sp-cream);
  padding: 32px;
  border-radius: var(--sp-radius);
}

/* LABEL */
.sp-request-form label,
.request-form label,
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--sp-navy);
  margin-bottom: 8px;
  margin-top: 18px;
}
.sp-request-form label:first-child,
.request-form label:first-child {
  margin-top: 0;
}

/* INPUT, TEXTAREA, SELECT */
.sp-request-form input[type="text"],
.sp-request-form input[type="email"],
.sp-request-form input[type="tel"],
.sp-request-form input[type="number"],
.sp-request-form input[type="url"],
.sp-request-form input[type="date"],
.sp-request-form select,
.sp-request-form textarea,
.request-form input[type="text"],
.request-form input[type="email"],
.request-form input[type="tel"],
.request-form select,
.request-form textarea,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--sp-text);
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-request-form input:focus,
.sp-request-form select:focus,
.sp-request-form textarea:focus,
.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--sp-blue);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}

.sp-request-form textarea,
.request-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.sp-request-form select,
.request-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2364748B' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

/* HELP TEXT */
.sp-request-form .form-field-description,
.sp-request-form small,
.request-form .form-field-description,
.request-form small {
  display: block;
  font-size: 13px;
  color: var(--sp-text-mute);
  margin-top: 6px;
  font-weight: 400;
}

/* CHECKBOX & RADIO */
.sp-request-form input[type="checkbox"],
.sp-request-form input[type="radio"],
.request-form input[type="checkbox"],
.request-form input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
  accent-color: var(--sp-blue);
}

/* FILE UPLOAD */
.sp-request-form input[type="file"],
.request-form input[type="file"] {
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px dashed var(--sp-border);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.sp-request-form input[type="file"]:hover,
.request-form input[type="file"]:hover {
  border-color: var(--sp-blue);
}

/* BOTTONI */
.sp-request-form button,
.sp-request-form input[type="submit"],
.request-form button,
.request-form input[type="submit"],
.form-actions button,
.form-actions input[type="submit"] {
  background: var(--sp-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 24px;
  transition: background 0.2s, transform 0.2s;
}
.sp-request-form button:hover,
.sp-request-form input[type="submit"]:hover,
.request-form button:hover,
.request-form input[type="submit"]:hover {
  background: #1E3A8A;
  transform: translateY(-1px);
}
.sp-request-form button:active,
.request-form button:active {
  transform: translateY(0);
}

/* CTA SECONDARIO */
.sp-request-form .button-secondary,
.request-form .button-secondary {
  background: #fff;
  color: var(--sp-navy);
  border: 1px solid var(--sp-border);
  margin-left: 8px;
}
.sp-request-form .button-secondary:hover,
.request-form .button-secondary:hover {
  border-color: var(--sp-navy);
  background: var(--sp-cream);
}

/* CAMPO RICHIESTO INDICATOR */
.sp-request-form .required:after,
.request-form .required:after,
.form-field.required label:after {
  content: " *";
  color: #DC2626;
}

/* ERRORI VALIDAZIONE */
.sp-request-form .field-error,
.request-form .field-error,
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: #DC2626 !important;
}
.error-message,
.form-field-error {
  color: #DC2626;
  font-size: 13px;
  margin-top: 6px;
}

/* NASCONDI search vagante e altri elementi rotti */
.sp-request-page > form[role="search"],
.sp-request-page > .search,
.sp-request-page input[type="search"]:not(.sp-request-form input) {
  display: none !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .sp-request-form,
  .request-form {
    padding: 20px;
  }
  .sp-request-header h1 {
    font-size: 24px;
  }
}
/* DETTAGLIO TICKET =========================== */
.sp-request-detail .sp-request-header {
  margin-bottom: 28px;
}
.sp-request-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
.sp-request-id {
  font-size: 13px;
  color: var(--sp-text-mute);
}
.sp-request-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-request-status--open,
.sp-request-status--new {
  background: #FEF3C7;
  color: #92400E;
}
.sp-request-status--pending {
  background: #DBEAFE;
  color: #1E40AF;
}
.sp-request-status--solved,
.sp-request-status--closed {
  background: #D1FAE5;
  color: #065F46;
}
.sp-request-status--hold {
  background: #FEE2E2;
  color: #991B1B;
}

/* COMMENTI */
.sp-comments {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sp-comment {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
}
.sp-comment--agent {
  background: var(--sp-cream);
  border-color: rgba(243,146,0,0.25);
}
.sp-comment__avatar {
  flex-shrink: 0;
}
.sp-comment__avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.sp-comment__body {
  flex: 1;
  min-width: 0;
}
.sp-comment__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.sp-comment__author {
  font-weight: 600;
  color: var(--sp-navy);
  font-size: 14px;
}
.sp-comment__badge {
  background: #F39200;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.sp-comment__date {
  color: var(--sp-text-mute);
  font-size: 13px;
}
.sp-comment__content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sp-text);
}
.sp-comment__content p { margin: 0 0 12px; }
.sp-comment__content p:last-child { margin-bottom: 0; }

.sp-attachments {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sp-attachments a {
  color: var(--sp-blue);
  text-decoration: none;
  font-size: 14px;
}
.sp-attachments a:hover { text-decoration: underline; }
.sp-attachments small { color: var(--sp-text-mute); }

/* FORM RISPOSTA */
.sp-comment-form {
  background: var(--sp-cream);
  padding: 24px;
  border-radius: var(--sp-radius);
}
.sp-comment-form h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--sp-navy);
}
.sp-comment-form .wysiwyg,
.sp-comment-form textarea {
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  width: 100%;
}
.sp-comment-form__attach {
  margin: 16px 0;
}
.sp-comment-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.sp-btn-primary,
.sp-comment-form input[type="submit"] {
  background: var(--sp-blue);
  color: #fff;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.sp-btn-primary:hover {
  background: #1E3A8A;
}

/* SIDEBAR DETTAGLI RICHIESTA */
.sp-request-sidebar h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--sp-navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-request-details {
  margin: 0;
}
.sp-request-details dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--sp-text-mute);
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.sp-request-details dt:first-child {
  margin-top: 0;
}
.sp-request-details dd {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--sp-text);
}
/* HEADER USER (LOGIN) ======================== */
.header .container {
  /* assicura spazio per il blocco login */
  gap: 24px;
}

.header-user {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* PULSANTE ACCEDI (utente NON loggato) */
.header-user__login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #F39200;
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.header-user__login:hover {
  background: #D97F00;
  transform: translateY(-1px);
}
.header-user__login svg {
  flex-shrink: 0;
}
/* PULSANTE REGISTRATI (utente NON loggato) */
.header-user__register {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  margin-right: 10px;
  background: #F39200;
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid #F39200;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.header-user__register:hover {
  background: #D97F00;
  border-color: #D97F00;
  transform: translateY(-1px);
}

.header-user__register svg {
  flex-shrink: 0;
}

/* DROPDOWN UTENTE LOGGATO */
.header-user__menu {
  position: relative;
}
.header-user__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--sp-cream);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sp-navy);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.header-user__btn:hover {
  border-color: #F39200;
  background: #fff;
}
.header-user__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #F39200;
  color: #fff;
  border-radius: 50%;
}
.header-user__chev {
  color: var(--sp-text-mute);
  transition: transform 0.2s;
}
.header-user__menu.is-open .header-user__chev {
  transform: rotate(180deg);
}

.header-user__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  padding: 8px;
  margin: 0;
  list-style: none;
  box-shadow: 0 12px 32px rgba(15,27,61,0.12);
  display: none;
  z-index: 100;
}
.header-user__menu.is-open .header-user__dropdown,
.header-user__menu:hover .header-user__dropdown {
  display: block;
}
.header-user__dropdown li a {
  display: block;
  padding: 10px 14px;
  color: var(--sp-text);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.header-user__dropdown {
  position: absolute;
  top: 100%;              /* attaccato al bottone, non più 8px sotto */
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;        /* stacco visivo, ma con bridge invisibile */
  list-style: none;
  box-shadow: 0 12px 32px rgba(15,27,61,0.12);
  display: none;
  z-index: 100;
}

/* Bridge invisibile che riempie il gap tra bottone e dropdown */
.header-user__dropdown::before {
  content: "";
  position: absolute;
  top: -8px;              /* copre i 8px di gap */
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}

/* Estendi area hover anche sul gap */
.header-user__menu:hover .header-user__dropdown,
.header-user__menu.is-open .header-user__dropdown {
  display: block;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .header-user__name {
    display: none;
  }
  .header-user__btn {
    padding: 8px 10px;
  }
  .header-user__login {
    padding: 8px 14px;
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .header-user__login span,
  .header-user__login {
    font-size: 12px;
  }
}
/* PAGINA LE MIE RICHIESTE ==================== */
.sp-requests-page {
  max-width: 1100px;
  width: 100%;
}

.sp-requests-header {
  margin-bottom: 24px;
}
.sp-requests-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  color: var(--sp-navy);
}

/* TAB NAVIGATION */
.sp-requests-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--sp-border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sp-requests-tab {
  padding: 12px 18px;
  text-decoration: none;
  color: var(--sp-text-mute);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.sp-requests-tab:hover {
  color: var(--sp-navy);
}
.sp-requests-tab.is-active,
.sp-requests-tab[aria-current="page"] {
  color: #F39200;
  border-bottom-color: #F39200;
}

/* TOOLBAR (search + filter) */
.sp-requests-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.sp-requests-search {
  flex: 1;
  min-width: 250px;
  position: relative;
}
.sp-requests-search input[type="search"],
.sp-requests-search input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.sp-requests-search input:focus {
  border-color: var(--sp-blue);
}
.sp-requests-search label {
  display: none;
}
/* nasconde il bottone "Cerca" extra se Zendesk lo aggiunge */
.sp-requests-search button,
.sp-requests-search input[type="submit"] {
  display: none;
}

.sp-requests-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sp-requests-filter label {
  font-size: 14px;
  font-weight: 500;
  color: var(--sp-text);
  white-space: nowrap;
}
.sp-requests-filter select {
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2364748B' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  color: var(--sp-text);
}
.sp-requests-filter select:focus {
  border-color: var(--sp-blue);
}

/* TABELLA RICHIESTE */
.sp-requests-table table,
.sp-requests-table .request-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--sp-radius);
  overflow: hidden;
  border: 1px solid var(--sp-border);
}

.sp-requests-table thead {
  background: var(--sp-cream);
}
.sp-requests-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-text-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--sp-border);
}
.sp-requests-table th a {
  color: var(--sp-text-mute);
  text-decoration: none;
}
.sp-requests-table th a:hover {
  color: var(--sp-navy);
}

.sp-requests-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--sp-border);
  font-size: 14px;
  color: var(--sp-text);
  vertical-align: middle;
}
.sp-requests-table tr:last-child td {
  border-bottom: none;
}
.sp-requests-table tr:hover td {
  background: rgba(243,146,0,0.03);
}

.sp-requests-table td a {
  color: var(--sp-navy);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.sp-requests-table td a:hover {
  color: #F39200;
}

/* STATUS BADGE nelle righe */
.sp-requests-table .status-label,
.sp-requests-table td:last-child {
  font-size: 12px;
}
.sp-requests-table .status-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.sp-requests-table .status-label-open,
.sp-requests-table .status-label-new {
  background: #FEF3C7;
  color: #92400E;
}
.sp-requests-table .status-label-pending {
  background: #DBEAFE;
  color: #1E40AF;
}
.sp-requests-table .status-label-solved,
.sp-requests-table .status-label-closed {
  background: #D1FAE5;
  color: #065F46;
}
.sp-requests-table .status-label-hold {
  background: #FEE2E2;
  color: #991B1B;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
  list-style: none;
  padding: 0;
}
.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--sp-text);
  font-size: 14px;
  font-weight: 500;
}
.pagination li.is-active a,
.pagination li.current a,
.pagination li.current span {
  background: var(--sp-navy);
  color: #fff;
  border-color: var(--sp-navy);
}
.pagination li a:hover {
  border-color: var(--sp-navy);
  color: var(--sp-navy);
}

/* nascondi search/cerca duplicate Copenhagen */
.sp-requests-page > form[role="search"]:first-of-type,
.sp-requests-page > .search:first-of-type {
  display: none !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .sp-requests-header h1 { font-size: 24px; }
  .sp-requests-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .sp-requests-tab {
    padding: 10px 14px;
    font-size: 13px;
  }
  .sp-requests-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .sp-requests-search,
  .sp-requests-filter {
    width: 100%;
  }
  .sp-requests-filter select { flex: 1; }

  /* Tabella → cards su mobile */
  .sp-requests-table table,
  .sp-requests-table thead,
  .sp-requests-table tbody,
  .sp-requests-table tr,
  .sp-requests-table td {
    display: block;
    width: 100%;
  }
  .sp-requests-table thead { display: none; }
  .sp-requests-table tr {
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px;
  }
  .sp-requests-table td {
    padding: 6px 0;
    border: none;
  }
}
/* PAGINA LE MIE RICHIESTE (v2) =============== */

.sp-mono {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 13px;
  color: var(--sp-text-mute);
}

.sp-empty-state {
  background: var(--sp-cream);
  border-radius: var(--sp-radius);
  padding: 48px 24px;
  text-align: center;
}
.sp-empty-state p {
  margin: 0 0 20px;
  color: var(--sp-text-mute);
  font-size: 15px;
}
.sp-empty-state .sp-btn-primary {
  display: inline-block;
  background: #F39200;
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s, transform 0.2s;
}
.sp-empty-state .sp-btn-primary:hover {
  background: #D97F00;
  transform: translateY(-1px);
}
/* SECTION HEADER con "Vedi tutti" =========== */
.sp-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sp-border);
  padding-bottom: 12px;
  margin-bottom: 4px;
  gap: 16px;
  flex-wrap: wrap;
}
.sp-section__header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  padding: 0;
  border: none;
}
.sp-section__header h2 a {
  color: var(--sp-navy);
  text-decoration: none;
  transition: color 0.15s;
}
.sp-section__header h2 a:hover {
  color: #F39200;
}

.sp-section__view-all {
  font-size: 13px;
  font-weight: 600;
  color: #F39200;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 14px;
  border: 1px solid #F39200;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.sp-section__view-all:hover {
  background: #F39200;
  color: #fff;
}

/* annulla il bordo della vecchia sp-section h2 (sostituito dal header sopra) */
.sp-section h2 {
  padding-bottom: 0;
  border-bottom: none;
}

/* SIDEBAR: rendi linkabili anche i titoli di sezione */
.sp-sidebar summary a {
  color: inherit;
  text-decoration: none;
  flex: 1;
}
.sp-sidebar summary a:hover {
  color: #F39200;
}
/* ===== REQUEST DETAIL PAGE ===== */
.sp-request-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}

@media (min-width: 1024px) {
  .sp-request-detail {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 40px;
  }
}

.sp-request-main { min-width: 0; }

.sp-request-header { margin-bottom: 32px; }
.sp-request-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.25;
  color: #1a1a1a;
}
.sp-request-meta { display: flex; gap: 12px; align-items: center; font-size: 14px; color: #666; }
.sp-request-status {
  padding: 4px 12px;
  border-radius: 12px;
  background: #FFE9B0;
  color: #7a5a00;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

/* Commenti — finalmente con larghezza decente */
.sp-request-comments { display: flex; flex-direction: column; gap: 16px; }

.sp-comment {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
}
.sp-comment--agent { background: #FFF8EC; border-color: #F0E0BA; }

.sp-comment-avatar {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #ddd;
  overflow: hidden;
}
.sp-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sp-comment-body { flex: 1; min-width: 0; }
.sp-comment-header { display: flex; gap: 12px; margin-bottom: 8px; align-items: baseline; }
.sp-comment-author { font-weight: 600; color: #1a1a1a; }
.sp-comment-date { font-size: 13px; color: #888; }
.sp-comment-content { line-height: 1.6; color: #2a2a2a; word-wrap: break-word; }
.sp-comment-content p { margin: 0 0 12px; }

/* Sidebar — più contenuta */
.sp-sidebar-card {
  background: #FAF4E4;
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 24px;
}
.sp-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
  color: #2a2a2a;
}
.sp-sidebar-card dl { margin: 0; }
.sp-sidebar-card dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-top: 16px;
}
.sp-sidebar-card dt:first-child { margin-top: 0; }
.sp-sidebar-card dd { margin: 4px 0 0; color: #2a2a2a; }

/* Form commento */
.sp-comment-form { margin-top: 32px; padding-top: 32px; border-top: 1px solid #ececec; }
.sp-comment-form h2 { font-size: 18px; margin: 0 0 16px; }

/* ===== REQUEST DETAIL PAGE ===== */

/* Layout 2:1 solo per la pagina dettaglio ticket */
.sp-layout:has(.sp-request-detail) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}

@media (min-width: 1024px) {
  .sp-layout:has(.sp-request-detail) {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 40px;
    align-items: start;
  }
}

.sp-request-detail { min-width: 0; }

/* Header */
.sp-request-header { margin-bottom: 28px; }
.sp-request-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.25;
  color: #1a1a1a;
}
.sp-request-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 14px; color: #666;
}
.sp-request-status {
  padding: 4px 12px;
  border-radius: 12px;
  background: #FFE9B0;
  color: #7a5a00;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}
.sp-request-status--solved   { background: #D6F0D9; color: #2d6a36; }
.sp-request-status--closed   { background: #E5E5E5; color: #555; }
.sp-request-status--pending  { background: #FFE4C9; color: #8a4a00; }

/* Lista commenti */
.sp-comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-comment {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
}
.sp-comment--agent { background: #FFF8EC; border-color: #F0E0BA; }

.sp-comment__avatar {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
}
.sp-comment__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sp-comment__body { flex: 1; min-width: 0; }

.sp-comment__head {
  display: flex; gap: 10px; align-items: baseline;
  margin-bottom: 8px; flex-wrap: wrap;
}
.sp-comment__author { font-weight: 600; color: #1a1a1a; }
.sp-comment__badge {
  background: #2a2a2a; color: #fff;
  padding: 2px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.sp-comment__date { font-size: 13px; color: #888; }

.sp-comment__content { line-height: 1.6; color: #2a2a2a; word-wrap: break-word; }
.sp-comment__content p { margin: 0 0 12px; }
.sp-comment__content p:last-child { margin-bottom: 0; }

/* Allegati */
.sp-attachments {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.sp-attachments a {
  color: #555; text-decoration: none; font-size: 14px;
}
.sp-attachments a:hover { color: #1a1a1a; text-decoration: underline; }

/* Form risposta */
.sp-comment-form {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #ececec;
}
.sp-comment-form h3 { font-size: 18px; margin: 0 0 16px; }
.sp-comment-form__attach { margin-top: 12px; }
.sp-comment-form__actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 16px;
}

/* Sidebar */
.sp-request-sidebar {
  background: #FAF4E4;
  border-radius: 12px;
  padding: 24px;
}
@media (min-width: 1024px) {
  .sp-request-sidebar { position: sticky; top: 24px; }
}
.sp-request-sidebar h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
  color: #2a2a2a;
}
.sp-request-details { margin: 0; }
.sp-request-details dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-top: 16px;
}
.sp-request-details dt:first-child { margin-top: 0; }
.sp-request-details dd { margin: 4px 0 0; color: #2a2a2a; }
/* ===== REQUEST DETAIL PAGE ===== */

/* Reset duro: niente eredità da altri layout */
.sp-layout--detail {
  display: block;
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
  gap: 0;
  grid-template-columns: none;
}

.sp-layout--detail > .sp-main,
.sp-layout--detail .sp-request-detail {
  display: block !important;
  grid-template-columns: none !important;
  width: 100%;
  min-width: 0;
}

/* Desktop: 2 colonne main + sidebar */
@media (min-width: 1024px) {
  .sp-layout--detail {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 40px;
    align-items: start;
  }
}

/* Header */
.sp-layout--detail .sp-request-header { margin-bottom: 28px; }
.sp-layout--detail .sp-request-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.25;
  color: #1a1a1a;
}
.sp-layout--detail .sp-request-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 14px; color: #666;
}
.sp-request-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  background: #FFE9B0;
  color: #7a5a00;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}
.sp-request-status--solved   { background: #D6F0D9; color: #2d6a36; }
.sp-request-status--closed   { background: #E5E5E5; color: #555; }
.sp-request-status--pending  { background: #FFE4C9; color: #8a4a00; }
.sp-request-status--hold     { background: #FFE9B0; color: #7a5a00; }

/* Lista commenti */
.sp-layout--detail .sp-comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.sp-layout--detail .sp-comment {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}
.sp-layout--detail .sp-comment--agent {
  background: #FFF8EC;
  border-color: #F0E0BA;
}

.sp-comment__avatar {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
}
.sp-comment__avatar img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.sp-comment__body { flex: 1; min-width: 0; }

.sp-comment__head {
  display: flex; gap: 10px; align-items: baseline;
  margin-bottom: 8px; flex-wrap: wrap;
}
.sp-comment__author { font-weight: 600; color: #1a1a1a; }
.sp-comment__badge {
  background: #2a2a2a; color: #fff;
  padding: 2px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-comment__date { font-size: 13px; color: #888; }

.sp-comment__content {
  line-height: 1.6;
  color: #2a2a2a;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.sp-comment__content p { margin: 0 0 12px; }
.sp-comment__content p:last-child { margin-bottom: 0; }

/* Allegati */
.sp-attachments {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.sp-attachments a {
  color: #555; text-decoration: none; font-size: 14px;
}
.sp-attachments a:hover { color: #1a1a1a; text-decoration: underline; }

/* Form risposta */
.sp-layout--detail .sp-comment-form {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #ececec;
}
.sp-layout--detail .sp-comment-form h3 { font-size: 18px; margin: 0 0 16px; }
.sp-comment-form__attach { margin-top: 12px; }
.sp-comment-form__actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 16px;
  flex-wrap: wrap;
}

/* Sidebar */
.sp-layout--detail .sp-request-sidebar {
  background: #FAF4E4;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .sp-layout--detail .sp-request-sidebar {
    position: sticky;
    top: 24px;
  }
}
.sp-layout--detail .sp-request-sidebar h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
  color: #2a2a2a;
}
.sp-request-details { margin: 0; }
.sp-request-details dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-top: 16px;
}
.sp-request-details dt:first-child { margin-top: 0; }
.sp-request-details dd { margin: 4px 0 0; color: #2a2a2a; }
/* ===== SEARCH RESULTS PAGE ===== */

/* Wrapper */
.container {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
  box-sizing: border-box;
}
.container-divider {
  height: 1px;
  background: #ececec;
  margin: 0 0 24px;
}

/* Sub-nav: breadcrumb + search box */
.sub-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .sub-nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Breadcrumbs — reset bullet/numero default */
.breadcrumbs,
.breadcrumbs ol,
ol.breadcrumbs {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: #888;
  counter-reset: none;
}
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: #ccc;
}
.breadcrumbs a { color: #888; text-decoration: none; }
.breadcrumbs a:hover { color: #1a1a1a; }

/* Search box nel sub-nav */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 280px;
}
.search-container .search-icon {
  position: absolute;
  left: 14px;
  color: #888;
  pointer-events: none;
  z-index: 1;
}
.search-container form,
.search-container .search { width: 100%; }
.search-container input[type="search"] {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid #ddd;
  border-radius: 24px;
  font-size: 14px;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}
.search-container input[type="search"]:focus {
  border-color: #C8939B;
  box-shadow: 0 0 0 3px rgba(200, 147, 155, 0.15);
}

/* Layout 2 colonne: sidebar filtri + risultati */
.search-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .search-results {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
}

/* Sidebar filtri */
.search-results-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filters-in-section {
  background: #FAF4E4;
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
}
.collapsible-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 16px;
  top: 14px;
  color: #666;
}
.collapsible-sidebar-title,
.sidenav-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
  color: #2a2a2a;
}
.multibrand-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidenav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  color: #2a2a2a;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s;
}
.sidenav-item:hover { background: rgba(255,255,255,0.6); }
.sidenav-item.current { background: #fff; font-weight: 600; }
.filter-name { flex: 1; }
.doc-count { color: #888; font-size: 13px; margin-left: 8px; }
.see-all-filters {
  background: none;
  border: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
  text-align: left;
  margin-top: 4px;
  width: 100%;
}
.see-all-filters:hover { color: #1a1a1a; }

/* Content tag selezionato */
.sidenav-tag { list-style: none; }
.sidenav-tag .content-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #fff;
  border-radius: 12px;
  font-size: 13px;
}
.sidenav-tag .close-icon { color: #666; }

/* Colonna risultati */
.search-results-column { min-width: 0; }
.search-results-subheading {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 24px;
  color: #1a1a1a;
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.search-results-list > li {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-results-list > li:hover {
  border-color: #d4d4d4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-result-title-container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.search-result-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}
.search-result-title a {
  color: #1a1a1a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.search-result-title a:hover { color: #C8939B; }

.search-result-icons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  color: #888;
  font-size: 13px;
}
.search-result-votes,
.search-result-meta-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-result-meta-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}
.search-result-breadcrumbs {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.search-result-breadcrumbs li + li::before {
  content: "›";
  margin-right: 6px;
  color: #ccc;
}
.search-result-breadcrumbs a { color: #888; text-decoration: none; }
.search-result-breadcrumbs a:hover { color: #1a1a1a; }
.meta-data { color: #888; }

.search-result-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}
.search-result-description em {
  font-style: normal;
  background: #FFE9B0;
  padding: 0 3px;
  border-radius: 2px;
  color: #7a5a00;
}

/* No results */
.no-results {
  text-align: center;
  padding: 48px 24px;
  background: #FAF4E4;
  border-radius: 12px;
}
.no-results svg { margin: 0 auto 24px; display: block; }
.no-results .headline {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1a1a1a;
}
.no-results .action-prompt {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}
.no-results .action-prompt a {
  color: #C8939B;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.no-results .action-prompt a:hover { text-decoration: underline; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0 0;
  list-style: none;
  padding: 0;
}
.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #2a2a2a;
  font-size: 14px;
  border: 1px solid #ececec;
}
.pagination .current,
.pagination a:hover {
  background: #C8939B;
  color: #fff;
  border-color: #C8939B;
}

/* Utility screen-reader */
.visibility-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* ===== SEARCH CLEAR BUTTON (✕) — versione robusta ===== */

.search-container,
.search-container .search,
.search-container form {
  position: relative;
}

.search-container input[type="search"] {
  padding-right: 44px;
}

/* Nasconde la X nativa Chrome/Safari */
.search-container input[type="search"]::-webkit-search-cancel-button,
.search-container input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* Becca QUALSIASI bottone/input dentro il search-container che non sia il search field */
.search-container button,
.search-container input[type="reset"],
.search-container input[type="button"],
.search-container [class*="clear"],
.search-container [class*="reset"],
.search-container [aria-label*="lear"],
.search-container [aria-label*="ancel"] {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  font-size: 0 !important;
  color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 5 !important;
}

/* Nasconde eventuali icone/SVG/testo interni del bottone originale */
.search-container button > *,
.search-container input[type="reset"] > *,
.search-container [class*="clear"] > *,
.search-container [class*="reset"] > * {
  display: none !important;
}

/* Disegna la × nostra con pseudo-elemento */
.search-container button::before,
.search-container input[type="reset"]::before,
.search-container input[type="button"]::before,
.search-container [class*="clear"]::before,
.search-container [class*="reset"]::before {
  content: "×" !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #999 !important;
  font-weight: 300 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  display: block !important;
}

.search-container button:hover,
.search-container input[type="reset"]:hover,
.search-container [class*="clear"]:hover,
.search-container [class*="reset"]:hover {
  background: #f0f0f0 !important;
}
.search-container button:hover::before,
.search-container input[type="reset"]:hover::before,
.search-container [class*="clear"]:hover::before,
.search-container [class*="reset"]:hover::before {
  color: #1a1a1a !important;
}

/* IMPORTANTE: l'icona lente di ingrandimento non deve essere trattata come reset */
.search-container .search-icon,
.search-container svg.search-icon {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #888 !important;
  pointer-events: none !important;
  z-index: 1 !important;
  background: none !important;
  width: 14px !important;
  height: 14px !important;
}