@font-face {
  font-family: "Titillium Web";
  src:
    local("Titillium Web Light"),
    local("TitilliumWeb-Light"),
    url("fonts/TitilliumWeb-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Titillium Web";
  src:
    local("Titillium Web Regular"),
    local("Titillium Web"),
    local("TitilliumWeb-Regular"),
    url("fonts/TitilliumWeb-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Titillium Web";
  src:
    local("Titillium Web Semibold"),
    local("TitilliumWeb-SemiBold"),
    url("fonts/TitilliumWeb-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Titillium Web";
  src:
    local("Titillium Web Bold"),
    local("TitilliumWeb-Bold"),
    url("fonts/TitilliumWeb-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
}

* { box-sizing: border-box; }
html { display: flex; flex-direction: column; min-height: 100vh; }
body {
  font-family: "Titillium Web", system-ui, -apple-system;
  margin: 0;
  color: #222;
  background: linear-gradient(180deg, #eef6ff 0%, #ddeaf8 45%, #d1e3f3 100%);
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 0;
}

.mountain-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mountain-layer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 42vh;
  opacity: 1;
  will-change: transform;
}

.mountain-layer::before,
.mountain-layer::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--mountain-color);
  clip-path: var(--mountain-shape);
}

.mountain-layer::before {
  left: 0;
}

.mountain-layer::after {
  left: 50%;
}

.mountain-back {
  --mountain-color: linear-gradient(180deg, #9ab687 0%, #7f9f6f 100%);
  --mountain-shape: polygon(
    0% 77%, 3% 75%, 6% 72%, 9% 68%, 12% 70%, 15% 64%, 18% 58%, 21% 60%,
    24% 55%, 27% 57%, 30% 61%, 33% 59%, 36% 54%, 39% 50%, 42% 53%, 45% 57%,
    48% 55%, 51% 51%, 54% 48%, 57% 52%, 60% 56%, 63% 54%, 66% 58%, 69% 61%,
    72% 58%, 75% 55%, 78% 59%, 81% 63%, 84% 60%, 87% 56%, 90% 60%, 93% 66%,
    96% 71%, 100% 77%, 100% 100%, 0 100%
  );
  height: 58vh;
  animation: mountainDriftSlow 400s linear infinite;
}

.mountain-mid {
  --mountain-color: linear-gradient(180deg, #7ea76b 0%, #648f55 100%);
  --mountain-shape: polygon(
    0% 82%, 2.5% 79%, 5% 74%, 7.5% 69%, 10% 71%, 12.5% 63%, 15% 56%, 17.5% 59%,
    20% 52%, 22.5% 55%, 25% 61%, 27.5% 57%, 30% 49%, 32.5% 45%, 35% 50%,
    37.5% 56%, 40% 53%, 42.5% 47%, 45% 42%, 47.5% 46%, 50% 54%, 52.5% 50%,
    55% 44%, 57.5% 39%, 60% 45%, 62.5% 51%, 65% 48%, 67.5% 43%, 70% 47%,
    72.5% 55%, 75% 52%, 77.5% 46%, 80% 50%, 82.5% 58%, 85% 55%, 87.5% 49%,
    90% 54%, 92.5% 63%, 95% 71%, 97.5% 77%, 100% 82%, 100% 100%, 0 100%
  );
  height: 50vh;
  animation: mountainDriftMedium 300s linear infinite;
}

.mountain-front {
  --mountain-color: linear-gradient(180deg, #5f9150 0%, #456f3b 100%);
  --mountain-shape: polygon(
    0% 86%, 2% 83%, 4% 78%, 6% 72%, 8% 73%, 10% 64%, 12% 56%, 14% 59%,
    16% 48%, 18% 44%, 20% 50%, 22% 58%, 24% 54%, 26% 46%, 28% 40%, 30% 45%,
    32% 55%, 34% 49%, 36% 39%, 38% 33%, 40% 41%, 42% 53%, 44% 47%, 46% 36%,
    48% 30%, 50% 38%, 52% 50%, 54% 45%, 56% 34%, 58% 29%, 60% 37%, 62% 48%,
    64% 43%, 66% 35%, 68% 40%, 70% 52%, 72% 47%, 74% 38%, 76% 44%, 78% 56%,
    80% 51%, 82% 43%, 84% 50%, 86% 62%, 88% 58%, 90% 50%, 92% 58%, 94% 69%,
    96% 77%, 98% 83%, 100% 86%, 100% 100%, 0 100%
  );
  height: 43vh;
  animation: mountainDriftFast 200s linear infinite;
}

@keyframes mountainDriftSlow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes mountainDriftMedium {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes mountainDriftFast {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .mountain-back,
  .mountain-mid,
  .mountain-front {
    animation: none;
  }
}

@media (max-width: 919px) {
  .mountain-layer {
    width: 260%;
  }

  .mountain-back {
    --mountain-shape: polygon(
      0% 79%, 5% 75%, 10% 70%, 15% 66%, 20% 62%, 25% 64%, 30% 59%, 35% 55%,
      40% 52%, 45% 54%, 50% 50%, 55% 47%, 60% 50%, 65% 54%, 70% 57%, 75% 61%,
      80% 64%, 85% 68%, 90% 72%, 95% 76%, 100% 79%, 100% 100%, 0 100%
    );
  }

  .mountain-mid {
    --mountain-shape: polygon(
      0% 84%, 5% 78%, 10% 72%, 15% 66%, 20% 60%, 25% 55%, 30% 58%, 35% 52%,
      40% 45%, 45% 48%, 50% 42%, 55% 39%, 60% 44%, 65% 50%, 70% 55%, 75% 60%,
      80% 64%, 85% 69%, 90% 74%, 95% 80%, 100% 84%, 100% 100%, 0 100%
    );
  }

  .mountain-front {
    --mountain-shape: polygon(
      0% 88%, 4% 83%, 8% 76%, 12% 68%, 16% 60%, 20% 52%, 24% 46%, 28% 50%,
      32% 43%, 36% 35%, 40% 30%, 44% 36%, 48% 44%, 52% 39%, 56% 32%, 60% 38%,
      64% 47%, 68% 43%, 72% 36%, 76% 42%, 80% 52%, 84% 58%, 88% 65%, 92% 73%,
      96% 82%, 100% 88%, 100% 100%, 0 100%
    );
  }
}

.site-header,
.container,
.site-footer {
  position: relative;
  z-index: 1;
}
.site-header {
  background: #fff;
  padding: 2px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  z-index: 1200;
}

/* HEADER DEL SITO */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.lang-selector {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
}

.lang-selector-menu {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-selector a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-left: 0;
  border: 1px solid rgba(0, 112, 192, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  box-shadow: 0 4px 10px rgba(20, 20, 30, 0.05);
  text-decoration: none;
}

.lang-selector-toggle {
  display: none;
}

.lang-selector img {
  width: 24px;
  height: auto;
  vertical-align: middle;
}

.lang-label {
  margin-right: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #33597e;
}

.lang-selector a:hover {
  background: #eaf4ff;
}

.lang-selector a:focus-visible {
  outline: 2px solid #0070c0;
  outline-offset: 2px;
}

.lang-option-text {
  display: none;
}

@media (max-width: 680px) {
  .header-content {
    align-items: center;
    flex-wrap: nowrap;
  }

  .hero {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(1.15rem, 4.2vw, 1.6rem);
    line-height: 1.12;
  }

  .lang-label,
  .lang-selector-menu {
    display: none;
  }

  .lang-selector {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .lang-selector-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(0, 112, 192, 0.16);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 20, 30, 0.08);
    cursor: pointer;
  }

  .lang-selector-toggle img {
    width: 24px;
    height: auto;
  }

  .lang-selector-toggle:focus-visible {
    outline: 2px solid #0070c0;
    outline-offset: 2px;
  }

  .lang-selector.is-open .lang-selector-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 188px;
    padding: 8px;
    border: 1px solid #d8e6f5;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1210;
  }

  .lang-selector.is-open .lang-option {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: none;
  }

  .lang-selector.is-open .lang-option img {
    width: 22px;
    flex: 0 0 auto;
  }

  .lang-selector.is-open .lang-option-text {
    display: inline;
    color: #21486e;
    font-size: 0.95rem;
    font-weight: 600;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(1.02rem, 4.8vw, 1.28rem);
  }
}

.container { max-width: 1920px; margin: 10px auto 20px auto; padding: 16px; }
.hero { text-align: left; margin-bottom: 5px; }
.hero h1 { color: #0070c0; margin: 6px 0; }

.home-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-message {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20,20,30,0.06);
  padding: 14px 18px;
}

.home-message-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-message-hidden {
  display: none;
}

.home-message-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  margin-top: 2px;
}

.home-message-body > :first-child {
  margin-top: 0;
}

.home-message-body > :last-child {
  margin-bottom: 0;
}

.home-message-body {
  flex: 1;
}

.home-message-symbol {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.home-message-info {
  background: #ffffff;
  border: 1px solid #d8e6f5;
}

.home-message-alert {
  background: #fff4e8;
  border: 1px solid #f7c590;
  color: #6e3a00;
}

.home-message-alert .home-message-symbol {
  background: #ffb15d;
  color: #5b2e00;
}

.home-message-critical {
  background: #ffe9ea;
  border: 1px solid #f2a3a8;
  color: #7f1218;
}

.home-message-critical .home-message-symbol {
  background: #d63a44;
  color: #ffffff;
}

.form-card {
  background: #fff;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20,20,30,0.06);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.form-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.form-card-header > h2 {
  margin: 0;
  padding: 0;
}

.container-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}

.container-title span {
  line-height: 1.12;
}

.title-icon {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.permits-info-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0070c0;
  text-decoration: underline;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.permits-info-link:hover {
  color: #005a9e;
  text-decoration: none;
}

.info-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#checkout-form {
  flex: 1;
  align-content: start;
}

html[lang="it"] form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
label { display: flex; flex-direction: column; font-size: 0.95rem; }
.container-label { display: flex; flex-direction: column; font-size: 1.2rem; font-weight: bold; padding: 8px 0;color: #0070c0;}
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="datetime-local"], select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: "Titillium Web", system-ui, -apple-system;
  background-color: #fff;
  color: #222;
}

select option,
select optgroup {
  background-color: #fff;
  color: #222;
}
.summary { display:flex; justify-content: space-between; align-items:center; width: 100%; }
.agreements { 
  display: flex; 
  flex-direction: column;
 /* align-items: flex-start;*/
  gap: 5px; 
  padding: 6px 0; 
  grid-column: 1 / -1; 
}
.permit-entries {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
}

.permit-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px 0;
  border-top: 1px solid #e5e7eb;
}

.permit-row-title {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  font-weight: bold;
  color: #222222;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.permit-pass-label {
  grid-column: 1 / -1;
}

.permit-row > label {
  min-width: 0;
}

.quantity-selector {
  grid-column: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-self: start;
  align-self: start;
  width: min(340px, 100%);
}

.quantity-selector-title {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.2;
  color: #223e5a;
}

.quantity-slider {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  padding: 3px;
  gap: 4px;
  --active-x: 0px;
  --thumb-width: 41px;
}

.quantity-slider-thumb {
  position: absolute;
  left: 0;
  top: 3px;
  width: var(--thumb-width);
  height: 34px;
  border-radius: 5px;
  background: #0070c0;
  transform: translateX(var(--active-x));
  transition: transform 220ms ease;
  z-index: 0;
}

.quantity-step {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 34px;
  border-radius: 5px;
  border: 1px solid #d1d5db;
  background: transparent;
  color: #000;
  font-size: 1.1rem;
  font-weight: 400;
  padding: 0;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.quantity-step:hover {
  background: #eef4fb;
  color: #325b7d;
  border-color: #d1d5db;
}

.quantity-step.is-active {
  color: #ffffff;
  border-color: transparent;
  background: transparent;
}

#email-label {
  width: 100%;
  align-self: start;
}

#emission-date-label {
  width: 100%;
  align-self: start;
}

@media (min-width: 1200px) {
  form,
  html[lang="it"] form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #email-label {
    grid-column: auto;
  }
}

.checkout-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px -18px -18px -18px;
  padding: 16px 20px;
  background-color: rgba(234, 244, 255, 0.7);
  border-top: 1px solid rgba(193, 219, 243, 0.85);
  border-radius: 0 0 8px 8px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  margin-top: auto;
}
.checkout-footer .summary {
  color: #0070c0;
  font-size: 1.05rem;
}

.checkout-summary-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.checkout-fees-note {
  font-size: 0.78rem;
  color: #0070c0;
  line-height: 1.15;
}

.checkout-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.checkout-actions button {
  flex-shrink: 0;
}
.required-note {
  color: #666666;
  font-size: 0.9rem;
  white-space: nowrap;
}

.taxid-footnote {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: #5f6f80;
  font-size: 0.86rem;
  line-height: 1.35;
}
.checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #0070c0;
}
.checkbox-label span {
  flex: 1;
  min-width: 0;
}
button { background:#0070c0; font-size: 1.00rem; color:#fff; border:none; padding:12px 14px; border-radius:8px; font-weight:600; cursor:pointer; font-family: "Titillium Web", system-ui, -apple-system; }
button:hover { background:#005a9e; }
button:disabled { opacity: 0.6; cursor: not-allowed; }
.button-link { display: inline-block; background:#0070c0; font-size: 1.00rem; color:#fff; border:none; padding:12px 14px; border-radius:8px; font-weight:600; cursor:pointer; font-family: "Titillium Web", system-ui, -apple-system; text-decoration: none; }
.button-link:hover { background:#005a9e; color:#fff; text-decoration: none; }

.admin-toolbar-year-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #0070c0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  border: 1px solid #0070c0;
  padding-right: 34px;
  min-width: 90px;
  color: #ffffff;
  cursor: pointer;
}

.admin-toolbar-year-select:hover,
.admin-toolbar-year-select:focus-visible,
.admin-toolbar-year-select:active {
  background-color: #0070c0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  color: #ffffff;
  border-color: #0070c0;
  cursor: pointer;
}

.admin-toolbar-year-select:focus {
  outline: 2px solid #9ac8f0;
  outline-offset: 2px;
}

@media (min-width:920px) {
  /* two-column layout: form on left, stacked cards on right */
  .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 31vw, 390px);
    justify-content: center;
    gap: 20px;
    align-items: start;
  }
  .home-messages { grid-column: 1 / -1; }
  /* hero spans entire row */
  .hero { grid-column: 1 / -1; text-align: left; }
  .side-cards {
    display: grid;
    grid-auto-rows: auto;
    gap: 20px;
    align-self: start;
    height: auto;
  }

  .side-cards .info-card {
    height: auto;
    max-width: none;
  }
}

@media (min-width: 1500px) {
  .container {
    grid-template-columns: minmax(0, 1fr) 620px;
  }

  .side-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .side-cards[data-home-layout="one"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-cards[data-home-layout="two"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-cards[data-home-layout="three"] {
    grid-template-areas:
      "tourism download"
      "weather weather";
  }

  .side-cards[data-home-layout="three"] #tourism-card {
    grid-area: tourism;
  }

  .side-cards[data-home-layout="three"] #download-card {
    grid-area: download;
  }

  .side-cards[data-home-layout="three"] #weather-alert-card {
    grid-area: weather;
  }
}

/* card used for additional info boxes */
.info-card {
  background: #fff;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20,20,30,0.06);
  max-width: 500px;
  text-align:justify;
  display: flex;
  flex-direction: column;
}

.info-card .container-title,
.info-card .container-title span {
  text-align: left;
}

.info-card .button-link,
.info-card .open-valle {
  margin-top: auto;
  align-self: flex-end;
}

/* Remove leading space before h2 titles in cards */
.info-card > h2 {
  margin: 0 0 12px 0;
  padding: 0;
}

.weather-alert-block {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f8fd;
}

.weather-alert-level-label,
.weather-forecast-label {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.weather-alert-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.weather-alert-updated-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.weather-alert-updated-at {
  margin: 0;
  font-size: 0.78rem;
  color: #4a5a6d;
  white-space: nowrap;
}

.weather-alert-info-open {
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}

.weather-alert-info-open:hover,
.weather-alert-info-open:active,
.weather-alert-info-open:focus,
.weather-alert-info-open:focus-visible {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

.weather-alert-info-open .info-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.weather-alert-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.weather-alert-risks-wrap {
  position: relative;
  width: 100%;
}

.weather-alert-risks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.weather-alert-risk-box {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: #95a4b3;
  width: 46px;
  min-width: 44px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 2px 10px rgba(16, 24, 40, 0.16);
  transition: none;
}

.weather-alert-risk-box:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 93, 152, 0.25);
}

.weather-alert-risk-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.weather-alert-risk-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.weather-alert-risk-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.weather-alert-risk-box.tone-neutral {
  background: #95a4b3;
}

.weather-alert-risk-box.tone-green {
  background: #3b944f;
}

.weather-alert-risk-box.tone-yellow {
  background: #d2ad32;
}

.weather-alert-risk-box.tone-orange {
  background: #d67a2a;
}

.weather-alert-risk-box.tone-red {
  background: #b03232;
}

.weather-alert-callout {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 6;
  width: min(300px, 90vw);
  background: #ffffff;
  border: 1px solid #d4dce4;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.16);
}

.weather-alert-callout[hidden] {
  display: none;
}

.weather-alert-callout-row {
  margin: 2px 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #243447;
}

.weather-alert-callout-row-primary,
.weather-alert-callout-row-primary strong,
.weather-alert-callout-row-primary span {
  font-weight: 700;
}

.weather-forecast-block {
  position: relative;
}

.weather-forecast-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weather-forecast-note {
  margin: 0;
  font-weight: 600;
  color: #5b6470;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #d9e1e9;
  border-radius: 999px;
  padding: 6px 14px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.weather-forecast-item {
  background: #edf1f5;
  border: 1px solid #d7dfe8;
  border-radius: 8px;
  min-height: 92px;
  padding: 6px 5px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  text-align: center;
}

.weather-day {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.weather-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.weather-icon-fallback {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4f5d6d;
}

.weather-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.weather-temp {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.weather-temps {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 2px;
}

.weather-temp-max {
  color: #7a1d2f;
}

.weather-temp-min {
  color: #0070c0;
}

@media (max-width: 1250px) {
  .weather-forecast-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .weather-forecast-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width:919px) {
  .container {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .home-message {
    padding: 12px 14px;
  }

  .side-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .form-card,
  .side-cards .info-card {
    width: 100%;
    max-width: none;
  }

  .hero h1 { font-size: 1.5rem; }
  .form-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .permits-info-link {
    white-space: normal;
  }
  .checkout-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 6px;
    row-gap: 10px;
    padding: 12px 14px;
  }

  .checkout-footer .checkout-summary-block {
    flex: 1 1 230px;
  }

  .checkout-actions {
    flex: 1 1 100%;
    width: 100%;
  }

  .checkout-actions button {
    flex: 1 1 100%;
    width: 100%;
  }
  .permit-row {
    grid-template-columns: 1fr;
  }

  form,
  html[lang="it"] form {
    grid-template-columns: 1fr;
  }

  .quantity-selector {
    grid-column: 1 / -1;
    width: 100%;
  }

  .quantity-slider {
    width: 100%;
    justify-content: space-between;
  }

  .quantity-step {
    min-width: 0;
    flex: 1;
  }

}

/* footer styling */
.site-footer {
  background: #fff;
  padding: 12px 16px;
  text-align: center;
  margin-top: auto;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}
.footer-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1px;
}
.footer-logo-left,
.footer-logo-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-logo-divider {
  width: 1px;
  height: 42px;
  background: #d1d5db;
  display: inline-flex;
  flex: 0 0 1px;
}

.footer-logos img {
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.footer-logo-left img {
  max-height: 40px;
  max-width: min(34vw, 210px);
}

.footer-logo-right img[alt="Altri enti"] {
  max-height: 54px;
  max-width: min(52vw, 360px);
}

.footer-logo-right img[alt="PagoPA"] {
  max-height: 40px;
  max-width: min(30vw, 190px);
}

/* Responsive footer logos: stack as two centered rows on narrow screens */
@media (max-width: 720px) {
  .footer-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  /* left logo on first row, other logos on second row centered */
  .footer-logo-left {
    order: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .footer-logo-right {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 16px;
  }

  .footer-logo-divider {
    display: none;
  }

  .footer-logo-right > img,
  .footer-logo-right > a {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .footer-logos img {
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .footer-logo-left img {
    max-width: min(72vw, 260px);
  }

  .footer-logo-right img[alt="Altri enti"] {
    max-height: 48px;
    max-width: min(90vw, 360px);
  }

  .footer-logo-right img[alt="PagoPA"] {
    max-width: min(64vw, 230px);
  }
}
.footer-text {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0;
  margin-top: 2px;
}

/* Inline link styling */
.privacy-link {
  color: #0070c0;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.regulation-link {
  color: #0070c0;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.privacy-link:hover {
  color: #005a9e;
  text-decoration: none;
}

.regulation-link:hover {
  color: #005a9e;
  text-decoration: none;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0070c0;
  text-decoration: underline;
  font-weight: 500;
  white-space: nowrap;
}

.inline-link {
  font-weight: 500;
}

.payment-status-banner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.payment-status-banner.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.payment-status-card {
  width: min(680px, calc(100% - 32px));
  background: #eaf4ff;
  border: 1px solid #c9dff3;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  padding: 18px 20px;
}

#payment-status-text {
  margin: 0;
  color: #075c9b;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.payment-status-error-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px 0;
}

.payment-status-error-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.payment-status-close {
  background: #fff;
  color: #9f1d1d;
  border: 1px solid #e2a5a5;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.payment-status-close:hover {
  background: #fde8e8;
}

.payment-status-loader {
  position: relative;
  width: 100%;
  height: 42px;
  margin: 0 0 12px 0;
  overflow: hidden;
}

.payment-mountain {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
}

.payment-mountain::before,
.payment-mountain::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--pm-color);
  clip-path: var(--pm-shape);
}

.payment-mountain::before { left: 0; }
.payment-mountain::after { left: 50%; }

.pm-back {
  --pm-color: rgba(122, 165, 200, 0.6);
  --pm-shape: polygon(0 100%, 8% 66%, 16% 83%, 24% 54%, 32% 74%, 40% 50%, 48% 71%, 56% 44%, 64% 69%, 72% 53%, 80% 78%, 88% 57%, 96% 82%, 100% 100%);
  animation: paymentMountainDrift 12s linear infinite;
}

.pm-mid {
  --pm-color: rgba(93, 144, 186, 0.65);
  --pm-shape: polygon(0 100%, 6% 73%, 12% 85%, 20% 58%, 29% 79%, 38% 55%, 46% 76%, 55% 52%, 64% 75%, 73% 56%, 82% 78%, 90% 60%, 100% 100%);
  animation: paymentMountainDrift 9s linear infinite;
}

.pm-front {
  --pm-color: rgba(62, 118, 164, 0.7);
  --pm-shape: polygon(0 100%, 10% 70%, 18% 83%, 27% 59%, 36% 81%, 45% 55%, 54% 80%, 63% 58%, 72% 82%, 82% 62%, 91% 79%, 100% 100%);
  animation: paymentMountainDrift 7s linear infinite;
}

.payment-status-banner.error .payment-status-card {
  background: #ffe8e8;
  border-color: #f2bcbc;
}

.payment-status-banner.error #payment-status-text {
  color: #9f1d1d;
  text-align: left;
}

.payment-status-banner.error .payment-status-loader {
  display: none;
}

.payment-status-banner.error .payment-status-error-head {
  display: flex;
}

.payment-status-banner.bootstrap-loading #payment-status-text {
  display: none;
}

.payment-status-banner.bootstrap-loading .payment-status-error-head {
  display: none;
}

.payment-status-banner.bootstrap-error-lock .payment-status-close {
  display: none;
}

.payment-status-banner.bootstrap-error-lock .payment-status-error-head {
  justify-content: flex-start;
}

@keyframes paymentMountainDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.login-page .container {
  width: min(560px, 100%);
  max-width: 560px;
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 460px;
}

.login-card .container-title {
  margin: 0 0 12px 0;
}

.login-card form {
  grid-template-columns: 1fr;
}

.login-card form label {
  grid-column: 1 / -1;
}

.login-card form button[type="submit"] {
  width: 100%;
  grid-column: 1 / -1;
}

.login-subtitle {
  margin: 0 0 14px 0;
  color: #555;
}

.login-error {
  margin: 0;
  min-height: 1.2em;
  color: #b42318;
  font-weight: 600;
}

.back-home {
  background: #fff;
  color: #0070c0;
  border: 1px solid #0070c0;
  text-decoration: none;
}

.back-home:hover {
  background: #fff;
  color: #005a9e;
  border-color: #005a9e;
}

.admin-page .container {
  display: block;
  width: min(1800px, calc(100vw - 32px));
  max-width: none;
  grid-template-columns: none;
  gap: 0;
  padding-left: 16px;
  padding-right: 16px;
  margin: 10px auto 20px auto;
}

.admin-header {
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.admin-header .hero h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header .hero {
  --admin-muted-gray: #6b7280;
}

.admin-title-main {
  color: #0070c0;
}

.admin-title-separator {
  display: inline-block;
  width: 1px;
  height: 1.35em;
  background: var(--admin-muted-gray);
}

.admin-title-sub {
  color: var(--admin-muted-gray);
  font-weight: 500;
  font-size: 0.72em;
}

.admin-nav {
  display: inline-flex;
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  width: fit-content;
  max-width: 100%;
  align-self: center;
}

.admin-nav-toggle,
.admin-nav-drawer-overlay {
  display: none;
}

.admin-nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 8px;
}

.admin-nav-drawer-title {
  display: none;
}

@media (max-width: 1200px) {
  .admin-nav .button-link {
    border-radius: 8px;
  }
}

.admin-nav .button-link {
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  color: #005a9e;
  border: 1px solid transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: none;
  --admin-nav-icon: none;
}

.admin-nav .button-link::before {
  content: "";
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  background-color: currentColor;
  opacity: 0.95;
  -webkit-mask: var(--admin-nav-icon) center / contain no-repeat;
  mask: var(--admin-nav-icon) center / contain no-repeat;
}

.admin-nav .button-link[data-page="statistiche"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19.2h16' stroke='black' stroke-width='2.1' stroke-linecap='round'/%3E%3Cpath d='M6.2 15.4l3.5-3.3 3.1 2.1 4.9-6' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3Cpath d='M15.6 8.2h2.9v2.9' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.admin-nav .button-link[data-page="gestione-permessi"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5.5h10a2 2 0 0 1 2 2v2.1a2.3 2.3 0 0 0 0 4.8v2.1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-2.1a2.3 2.3 0 0 0 0-4.8V7.5a2 2 0 0 1 2-2z' fill='black'/%3E%3Cpath d='M9.3 12.3l1.8 1.8 3.8-4' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.admin-nav .button-link[data-page="gestore-permessi"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5.5h10a2 2 0 0 1 2 2v2.1a2.3 2.3 0 0 0 0 4.8v2.1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-2.1a2.3 2.3 0 0 0 0-4.8V7.5a2 2 0 0 1 2-2z' fill='black'/%3E%3Cpath d='M9.3 12.3l1.8 1.8 3.8-4' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.admin-nav .button-link[data-page="gestore-emissione-permessi"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='6' width='16' height='12' rx='2.2' fill='black'/%3E%3Cpath d='M12 9v6M9 12h6' stroke='white' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E");
}

.admin-nav .button-link[data-page="gestione-varchi"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5.5' cy='17.2' r='2.5' fill='black'/%3E%3Ccircle cx='18.2' cy='6.8' r='2.5' fill='black'/%3E%3Cpath d='M7.9 16.2c2-3.4 4.1-3.4 5.5-5.8 1-1.7 2.3-2.5 3.7-3.1' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.admin-nav .button-link[data-page="gestione-tariffe"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='10' cy='9' rx='5.4' ry='3.3' fill='black'/%3E%3Cpath d='M4.6 9v4.4c0 1.8 2.4 3.3 5.4 3.3s5.4-1.5 5.4-3.3V9' fill='black'/%3E%3Cellipse cx='15.1' cy='13.1' rx='5.4' ry='3.3' fill='black' opacity='0.82'/%3E%3Cpath d='M9.7 13.1v4.4c0 1.8 2.4 3.3 5.4 3.3s5.4-1.5 5.4-3.3v-4.4' fill='black' opacity='0.82'/%3E%3C/svg%3E");
}

.admin-nav .button-link[data-page="avanzate"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='5' width='12' height='2.2' rx='1.1' fill='black'/%3E%3Ccircle cx='17.5' cy='6.1' r='2.2' fill='black'/%3E%3Crect x='8' y='10.9' width='12' height='2.2' rx='1.1' fill='black'/%3E%3Ccircle cx='6.5' cy='12' r='2.2' fill='black'/%3E%3Crect x='4' y='16.8' width='12' height='2.2' rx='1.1' fill='black'/%3E%3Ccircle cx='17.5' cy='17.9' r='2.2' fill='black'/%3E%3C/svg%3E");
}

.admin-nav .button-link[data-action="logout"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 5H5v14h5' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M13 8l4 4-4 4' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 12h9' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E");
}

.admin-nav .button-link:hover {
  background: #eaf4ff;
  color: #004f8f;
  border-color: transparent;
}

.admin-nav .button-link.active {
  background: #0070c0;
  border-color: #005a9e;
  color: #fff;
  box-shadow: none;
}

.admin-header.admin-header-compact {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
}

.admin-header.admin-header-compact .hero {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-header.admin-header-compact .hero h1 {
  flex-wrap: wrap;
}

.admin-header.admin-header-compact .admin-nav {
  margin-left: auto;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1220;
  flex-wrap: nowrap;
}

.admin-header.admin-header-compact .admin-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(0, 90, 158, 0.16);
  border-radius: 10px;
  background: #fff;
  color: #005a9e;
  cursor: pointer;
  flex: 0 0 auto;
  order: -1;
  position: relative;
  z-index: 1222;
}

.admin-header.admin-header-compact .admin-nav-toggle:hover {
  background: #eaf4ff;
}

.admin-header.admin-header-compact .admin-nav-toggle:focus-visible {
  outline: 2px solid #0070c0;
  outline-offset: 2px;
}

.admin-header.admin-header-compact .admin-nav-toggle-bar,
.admin-header.admin-header-compact .admin-nav-toggle::before,
.admin-header.admin-header-compact .admin-nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.admin-header.admin-header-compact .admin-nav.admin-nav-drawer-open .admin-nav-toggle::before {
  transform: translateY(7px) rotate(45deg);
}

.admin-header.admin-header-compact .admin-nav.admin-nav-drawer-open .admin-nav-toggle-bar {
  opacity: 0;
}

.admin-header.admin-header-compact .admin-nav.admin-nav-drawer-open .admin-nav-toggle::after {
  transform: translateY(-7px) rotate(-45deg);
}

.admin-header.admin-header-compact .admin-nav-drawer-overlay {
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  border: 0;
  padding: 0;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  z-index: 1210;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.admin-header.admin-header-compact .admin-nav-drawer-overlay:hover,
.admin-header.admin-header-compact .admin-nav-drawer-overlay:active,
.admin-header.admin-header-compact .admin-nav-drawer-overlay:focus,
.admin-header.admin-header-compact .admin-nav-drawer-overlay:focus-visible {
  background: rgba(15, 23, 42, 0.38);
  outline: none;
}

.admin-header.admin-header-compact .admin-nav.admin-nav-drawer-open .admin-nav-drawer-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.admin-header.admin-header-compact .admin-nav-links {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, calc(100vw - 64px));
  max-width: 100%;
  padding: 84px 18px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #edf5fc 100%);
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  transform: translateX(calc(-100% - 16px));
  transition: none;
  z-index: 1211;
  flex-wrap: nowrap;
}

.admin-header.admin-header-compact .admin-nav.admin-nav-animated .admin-nav-links {
  transition: transform 0.24s ease;
}

.admin-header.admin-header-compact .admin-nav.admin-nav-drawer-open .admin-nav-links {
  transform: translateX(0);
}

.admin-header.admin-header-compact .admin-nav-drawer-title {
  display: block;
  margin: 0 0 4px;
  color: #5b6778;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-header.admin-header-compact .admin-nav-links .button-link {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
}

.admin-header.admin-header-compact .admin-nav .button-link.logout-btn {
  position: relative;
  z-index: 1101;
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .admin-title-separator {
    display: none;
  }

  .admin-title-sub {
    display: block;
    width: 100%;
    font-size: 0.68em;
  }

  .admin-header.admin-header-compact .admin-nav-links {
    width: min(280px, calc(100vw - 40px));
    padding-left: 14px;
    padding-right: 14px;
  }

  .admin-header.admin-header-compact .admin-nav .button-link.logout-btn {
    padding-left: 12px;
    padding-right: 12px;
  }
}

body.admin-page[data-page="statistiche"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19.2h16' stroke='black' stroke-width='2.1' stroke-linecap='round'/%3E%3Cpath d='M6.2 15.4l3.5-3.3 3.1 2.1 4.9-6' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3Cpath d='M15.6 8.2h2.9v2.9' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

body.admin-page[data-page="gestione-permessi"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5.5h10a2 2 0 0 1 2 2v2.1a2.3 2.3 0 0 0 0 4.8v2.1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-2.1a2.3 2.3 0 0 0 0-4.8V7.5a2 2 0 0 1 2-2z' fill='black'/%3E%3Cpath d='M9.3 12.3l1.8 1.8 3.8-4' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

body.admin-page[data-page="gestore-permessi"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5.5h10a2 2 0 0 1 2 2v2.1a2.3 2.3 0 0 0 0 4.8v2.1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-2.1a2.3 2.3 0 0 0 0-4.8V7.5a2 2 0 0 1 2-2z' fill='black'/%3E%3Cpath d='M9.3 12.3l1.8 1.8 3.8-4' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

body.admin-page[data-page="gestore-emissione-permessi"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4.5h8.8l3.2 3.2V19a1.8 1.8 0 0 1-1.8 1.8H6A1.8 1.8 0 0 1 4.2 19V6.3A1.8 1.8 0 0 1 6 4.5z' fill='black'/%3E%3Cpath d='M14.8 4.5v3.4h3.4' fill='white' opacity='.28'/%3E%3Cpath d='M8 15.8l5.8-5.8 1.9 1.9-5.8 5.8H8z' fill='white'/%3E%3Cpath d='M13.2 9.4l1.2-1.2a1 1 0 0 1 1.4 0l.8.8a1 1 0 0 1 0 1.4l-1.2 1.2' fill='white'/%3E%3C/svg%3E");
}

body.admin-page[data-page="gestione-varchi"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5.5' cy='17.2' r='2.5' fill='black'/%3E%3Ccircle cx='18.2' cy='6.8' r='2.5' fill='black'/%3E%3Cpath d='M7.9 16.2c2-3.4 4.1-3.4 5.5-5.8 1-1.7 2.3-2.5 3.7-3.1' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

body.admin-page[data-page="gestione-tariffe"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='10' cy='9' rx='5.4' ry='3.3' fill='black'/%3E%3Cpath d='M4.6 9v4.4c0 1.8 2.4 3.3 5.4 3.3s5.4-1.5 5.4-3.3V9' fill='black'/%3E%3Cellipse cx='15.1' cy='13.1' rx='5.4' ry='3.3' fill='black' opacity='0.82'/%3E%3Cpath d='M9.7 13.1v4.4c0 1.8 2.4 3.3 5.4 3.3s5.4-1.5 5.4-3.3v-4.4' fill='black' opacity='0.82'/%3E%3C/svg%3E");
}

body.admin-page[data-page="avanzate"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='5' width='12' height='2.2' rx='1.1' fill='black'/%3E%3Ccircle cx='17.5' cy='6.1' r='2.2' fill='black'/%3E%3Crect x='8' y='10.9' width='12' height='2.2' rx='1.1' fill='black'/%3E%3Ccircle cx='6.5' cy='12' r='2.2' fill='black'/%3E%3Crect x='4' y='16.8' width='12' height='2.2' rx='1.1' fill='black'/%3E%3Ccircle cx='17.5' cy='17.9' r='2.2' fill='black'/%3E%3C/svg%3E");
}

.admin-nav.admin-nav-plain {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-user-name {
  color: #0b5fa5;
  font-size: 0.98rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-nav.admin-nav-plain .admin-user-name {
  color: #6b7280;
  font-weight: 500;
}

.admin-nav.admin-nav-plain .admin-user-name::before {
  content: "Utente: ";
}

.admin-main-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(20, 20, 30, 0.06);
  padding: 18px;
  width: 100%;
}

.manager-permits-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#permit-editor-card .admin-permit-actions {
  margin-top: 10px;
}

#permit-editor-card input[name="tariffAmount"][readonly] {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.admin-main-card h2 {
  margin-top: 0;
  color: #0070c0;
}

.admin-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-section-title::before {
  content: "";
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  min-width: 1.8rem;
  background-color: currentColor;
  opacity: 0.96;
  -webkit-mask: var(--admin-section-icon) center / contain no-repeat;
  mask: var(--admin-section-icon) center / contain no-repeat;
}

.admin-section-title--advanced::before {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.admin-card-head h2 {
  margin: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-panel {
  border: 1px solid #d9e6f4;
  border-radius: 8px;
  padding: 14px;
  background: #fcfdff;
}

.admin-panel h3 {
  margin: 0 0 10px 0;
  color: #005a9e;
}

.admin-chart-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 180px;
}

.admin-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.admin-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #7eb8ea 0%, #0070c0 100%);
}

.admin-bar-label {
  font-size: 0.85rem;
  color: #325f85;
}

.admin-bar-value {
  font-size: 0.8rem;
  color: #325f85;
}

.admin-stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
}

.admin-stats-left {
  display: grid;
  gap: 14px;
}

.admin-stats-donuts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-stats-right {
  display: flex;
}

.admin-stats-right-stack {
  display: grid;
  gap: 14px;
  width: 100%;
}

.admin-stats-summary {
  width: 100%;
}

.admin-stats-metrics {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-metric-card {
  background: #f5f9fd;
  border: 1px solid #d6e4f1;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.admin-metric-label {
  font-size: 0.82rem;
  color: #516170;
}

.admin-metric-card strong {
  color: #0b5fa5;
  font-size: 1.05rem;
}

.admin-stats-status-meta {
  margin-top: 8px;
  font-size: 0.76rem;
  color: #7b8794;
}

.admin-stats-filters-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-stats-filters-form > .admin-stats-filter-field {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: #42576a;
}

.admin-stats-filter-field > span {
  line-height: 1.2;
}

.admin-stats-filters-form .admin-multiselect-list {
  max-height: 188px;
}

.admin-stats-filters-form .admin-multiselect-toggle {
  position: relative;
  display: block;
  height: 40px;
  min-height: 40px;
  line-height: 22px;
  padding-right: 34px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-stats-filters-form .admin-multiselect-toggle::after {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  margin-left: 0;
}

.admin-stats-filters-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #dbe4ee;
}

.admin-stats-filters-actions .button-link {
  background: #ffffff;
  color: #0070c0;
  border: 1px solid #0070c0;
}

.admin-stats-filters-actions .button-link:hover {
  background: #eaf4ff;
  border-color: #005a9e;
  color: #005a9e;
}

.admin-chart-bars {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: 208px;
  gap: 8px;
  align-items: end;
}

.admin-bar-item {
  position: relative;
  gap: 4px;
  align-items: stretch;
  padding: 2px 6px 0;
}

.admin-bar-item::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2px;
  bottom: 20px;
  width: 1px;
  background: #d8e1ea;
}

.admin-bar-item:last-child::after {
  display: none;
}

.admin-bar-value {
  font-size: 0.75rem;
}

.admin-bar-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  min-height: 130px;
}

.admin-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.admin-bar-col-value {
  font-size: 0.66rem;
  color: #2f4f6a;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-bar-label {
  font-size: 0.78rem;
  text-align: center;
  white-space: nowrap;
}

.admin-bar-col-label {
  font-size: 0.68rem;
  color: #607789;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.admin-bar.is-permits {
  background: linear-gradient(180deg, #8fc2eb 0%, #2e86d2 100%);
}

.admin-bar.is-amount {
  background: linear-gradient(180deg, #88d7ca 0%, #188f7f 100%);
}

.admin-bar-amount {
  font-size: 0.72rem;
  color: #4f6b86;
}

.admin-pie-chart {
  position: relative;
  width: min(100%, 420px);
  min-height: 272px;
  margin: 0 auto;
}

.admin-donut-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #d2e0ee;
}

.admin-donut-hole {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 27%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 1px solid #dbe7f3;
}

.admin-pie-callout-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.admin-pie-callout-line {
  stroke: #8ea8bf;
  stroke-width: 0.9;
  fill: none;
}

.admin-pie-callout-dot {
  fill: #8ea8bf;
}

.admin-pie-callout {
  position: absolute;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 1px solid #d4e1ee;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.73rem;
  color: #324a5f;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-pie-callout strong {
  color: #1f3b53;
}

.admin-pie-chart.is-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #607386;
}

.admin-chart-empty {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #607386;
  font-size: 0.9rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-table-pagination .button-link {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.admin-table-pagination .button-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-table-pagination-status {
  font-size: 0.85rem;
  color: #4b5563;
  white-space: nowrap;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

.admin-table th {
  color: #334155;
  background: #eceff3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table-header-row th {
  padding: 0;
}

.admin-table-sort-button {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px;
  color: inherit;
  font-size: 0.95rem;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.1;
  text-transform: uppercase;
}

.admin-table-sort-button:hover,
.admin-table-sort-button:focus-visible {
  background: transparent;
  color: inherit;
  border: none;
  box-shadow: none;
  outline: none;
}

.admin-table-sort-button.is-active {
  font-weight: 600;
  color: #0070c0;
}

.admin-sort-indicator {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 0.85rem;
  line-height: 0.7;
  color: #94a3b8;
  font-size: 0.55rem;
  font-weight: 700;
}

.admin-sort-indicator::before {
  content: "▲";
}

.admin-sort-indicator::after {
  content: "▼";
}

.admin-sort-indicator.is-asc::before,
.admin-sort-indicator.is-desc::after {
  color: #334155;
}

.admin-sort-indicator.is-asc::after,
.admin-sort-indicator.is-desc::before {
  color: #cbd5e1;
}

.admin-table-filter-row {
  background: #ffffff;
}

.admin-table-filter-row th {
  padding: 6px 10px;
}

.admin-table-filter-row input {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
}

.admin-cell-primary {
  display: block;
}

.admin-cell-primary-second-line {
  margin-top: 2px;
}

.admin-cell-secondary {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: none;
  letter-spacing: normal;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-actions .button-link {
  padding: 7px 10px;
  font-size: 0.85rem;
  background: #ffffff;
  color: #0070c0;
  border: 1px solid #0070c0;
}

.admin-actions .button-link:hover,
.admin-actions .button-link:focus-visible {
  background: #eef6ff;
  color: #005a9e;
  border-color: #005a9e;
}

.admin-actions .danger-button {
  background: #ffffff;
  color: #b42318;
  border-color: #b42318;
}

.admin-actions .danger-button:hover,
.admin-actions .danger-button:focus-visible {
  background: #fff1f1;
  color: #9f1d1d;
  border-color: #9f1d1d;
}

.admin-edit-pencil {
  display: inline-block;
  line-height: 1;
  transform: rotate(135deg);
  transform-origin: center;
}

.admin-pdf-doc-icon {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 18px;
  height: 22px;
  border: 1px solid #0070c0;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: #0070c0;
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  padding-bottom: 2px;
  box-sizing: border-box;
}

.admin-pdf-doc-icon::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 7px 7px;
  border-color: transparent transparent #cfe5fb transparent;
}

.admin-pdf-doc-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  border-top: 1px solid #0070c0;
  border-right: 1px solid #0070c0;
  border-top-right-radius: 2px;
}

.admin-toolbar {
  margin: 14px 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-toolbar .button-link[id^="export-"] {
  background: #ffffff;
  color: #0070c0;
  border: 1px solid #0070c0;
}

.admin-toolbar .button-link[id$="-health"] {
  background: #ffffff;
  color: #0070c0;
  border: 1px solid #0070c0;
}

.admin-toolbar .button-link.admin-accessi-verify-btn {
  background: #0070c0;
  color: #ffffff;
  border: 1px solid #0070c0;
}

.admin-toolbar .button-link[id^="export-"]:hover,
.admin-toolbar .button-link[id^="export-"]:focus-visible,
.admin-toolbar .button-link[id$="-health"]:hover,
.admin-toolbar .button-link[id$="-health"]:focus-visible {
  background: #eef6ff;
  color: #005a9e;
  border-color: #005a9e;
}

.admin-toolbar .button-link.admin-accessi-verify-btn:hover,
.admin-toolbar .button-link.admin-accessi-verify-btn:focus-visible {
  background: #005a9e;
  color: #ffffff;
  border-color: #005a9e;
}

.admin-card-head .admin-toolbar {
  margin: 0;
}
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.admin-section-header h3 {
  margin: 0;
}
.admin-section-header .admin-toolbar {
  margin: 0;
}

.admin-form-inline {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.admin-form-inline label {
  font-size: 0.85rem;
}

.admin-note {
  color: #4b5563;
  margin: 0;
}

.admin-page .container.admin-advanced-page-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-advanced-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-advanced-sidebar {
  border: 1px solid #d9e6f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.admin-advanced-sidebar h2 {
  margin: 0 0 10px 0;
  color: #0070c0;
  font-size: 1.1rem;
}

.admin-advanced-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-advanced-menu a {
  display: block;
  text-decoration: none;
  color: #005a9e;
  background: #fff;
  border: 1px solid #cfe1f3;
  border-radius: 6px;
  padding: 9px 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.admin-advanced-menu a:hover {
  background: #eef6ff;
  border-color: #a9cae9;
}

.admin-advanced-menu a.is-active {
  color: #fff;
  background: linear-gradient(180deg, #0070c0 0%, #005a9e 100%);
  border-color: #005a9e;
}

.admin-advanced-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.admin-advanced-content .admin-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  min-width: 0;
}

.admin-advanced-content .admin-panel .admin-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.admin-advanced-content section[hidden] {
  display: none;
}

.admin-advanced-text-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-advanced-text-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  grid-column: 1 / -1;
}

.admin-advanced-text-form > label,
.admin-advanced-text-form .admin-html-editor,
.admin-advanced-text-form .admin-advanced-text-actions {
  grid-column: 1 / -1;
}

.admin-advanced-text-form textarea {
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.35;
}

.admin-html-editor {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.admin-email-editor-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
}

.admin-email-editor-title {
  margin: 0;
  font-weight: 600;
  color: #1f2937;
}

.admin-email-info-button {
  min-height: 30px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0070c0;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.admin-email-info-button:hover,
.admin-email-info-button:focus-visible {
  color: #005a9e;
  text-decoration: none;
}

.admin-email-info-button:active,
.admin-email-info-button:focus,
.admin-email-info-button:focus-visible {
  background: #ffffff;
}

.admin-email-placeholders-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.admin-email-editor-wrap {
  width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
}

#advanced-email-html-editor {
  width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
}

.admin-advanced-email-form {
  grid-template-columns: minmax(0, 1fr);
}

.admin-advanced-email-form > label,
.admin-advanced-email-form > .admin-email-editor-header,
.admin-advanced-email-form > .admin-email-editor-wrap,
.admin-advanced-email-form > .admin-advanced-text-actions,
.admin-advanced-email-form > .admin-note,
.admin-advanced-email-form > .admin-field-full {
  grid-column: 1 / -1;
}

.admin-advanced-email-form .admin-checkbox-field {
  grid-column: 1 / -1;
}

.admin-email-placeholders-callout {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 7;
  min-width: 320px;
  max-width: min(520px, 92vw);
  background: #ffffff;
  border: 1px solid #d4dce4;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.16);
}

.admin-email-placeholders-callout::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid #d4dce4;
  border-top: 1px solid #d4dce4;
  transform: rotate(45deg);
}

.admin-email-placeholders-callout[hidden] {
  display: none;
}

#advanced-email-send-test {
  background: #ffffff;
  color: #0070c0;
  border: 1px solid #0070c0;
}

#advanced-email-send-test:hover,
#advanced-email-send-test:focus-visible {
  background: #eef6ff;
  color: #005a9e;
  border-color: #005a9e;
}

.admin-html-editor.is-disabled {
  background: #f3f4f6;
  border-color: #d1d5db;
  opacity: 0.78;
  pointer-events: none;
}

.admin-html-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.admin-html-toolbar button {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  line-height: 1;
}

.admin-html-toolbar button svg {
  fill: currentColor;
  stroke: currentColor;
}

.admin-html-toolbar select {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
}

.admin-html-toolbar select.is-active {
  border-color: #005a9e;
  box-shadow: inset 0 0 0 1px #005a9e;
  background: #eff6ff;
}

.admin-html-color-control {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-size: 0.85rem;
  color: #334155;
}

.admin-html-color-control.is-active {
  border-color: #005a9e;
  box-shadow: inset 0 0 0 1px #005a9e;
}

.admin-html-color-control span {
  font-weight: 600;
  white-space: nowrap;
}

.admin-html-color-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #0f172a;
  flex: 0 0 auto;
}

.admin-html-color-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.admin-html-color-control input[type="color"] {
  width: 32px;
  height: 28px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.admin-html-color-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.admin-html-color-action {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 0.78rem;
}

.admin-html-color-action:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.admin-html-toolbar button:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.admin-html-toolbar button.is-active {
  background: #005a9e;
  border-color: #005a9e;
  color: #fff;
}

.admin-html-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
}

.admin-html-toolbar-group-image {
  position: relative;
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid #d7dee7;
}

.admin-text-image-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: min(360px, 80vw);
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 8px;
}

.admin-text-image-panel[hidden] {
  display: none !important;
}

.admin-text-image-panel label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: #334155;
}

.admin-text-image-panel select,
.admin-text-image-panel input[type="text"] {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
}

.admin-text-image-panel .admin-toolbar {
  margin: 0;
  justify-content: flex-end;
}

.admin-icon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-icon-button svg {
  fill: currentColor;
}

.admin-icon-button.is-active {
  background: #005a9e;
  border-color: #005a9e;
  color: #fff;
}

.admin-html-surface {
  min-height: 280px;
  padding: 10px 12px;
  outline: none;
  overflow: auto;
  line-height: 1.5;
}

.admin-html-surface::after,
.modal-body::after,
.home-message-body::after,
#valley-card-text::after {
  content: "";
  display: block;
  clear: both;
}

.managed-content-image {
  display: block;
  margin: 14px 0;
}

.managed-content-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.managed-content-image figcaption {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #475569;
}

.managed-content-image--w-25 { width: 25%; }
.managed-content-image--w-33 { width: 33%; }
.managed-content-image--w-40 { width: 40%; }
.managed-content-image--w-50 { width: 50%; }
.managed-content-image--w-60 { width: 60%; }
.managed-content-image--w-75 { width: 75%; }
.managed-content-image--w-100 { width: 100%; }

.managed-content-image--align-left {
  margin-left: 0;
  margin-right: auto;
}

.managed-content-image--align-center {
  margin-left: auto;
  margin-right: auto;
}

.managed-content-image--align-right {
  margin-left: auto;
  margin-right: 0;
}

.managed-content-image--float-left {
  float: left;
  margin: 4px 18px 12px 0;
}

.managed-content-image--float-right {
  float: right;
  margin: 4px 0 12px 18px;
}

.admin-html-surface:empty::before {
  content: "Inserisci qui il contenuto HTML...";
  color: #9ca3af;
}

.admin-html-source {
  width: 100%;
  min-height: 280px;
  border: none;
  border-radius: 0;
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.35;
  resize: vertical;
}

.admin-advanced-text-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
  border-radius: 0 0 8px 8px;
  width: 100%;
  box-sizing: border-box;
}

.admin-advanced-text-actions .admin-note {
  min-height: 1.2em;
}

.admin-advanced-text-actions .admin-toolbar {
  margin: 0;
}

.admin-track-form .admin-advanced-text-actions,
.admin-advanced-text-form .admin-advanced-text-actions,
.admin-advanced-email-form .admin-advanced-text-actions {
  grid-column: 1 / -1;
  width: 100%;
}

.admin-advanced-warning {
  margin-bottom: 12px;
}

.admin-api-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 700px) {
  .admin-api-examples {
    grid-template-columns: 1fr;
  }
}

.admin-api-example-box {
  background: #f4f6f9;
  border: 1px solid #d0d7e2;
  border-radius: 6px;
  padding: 14px 16px;
  overflow: hidden;
}

.admin-api-example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-api-example-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555e6e;
  margin: 0;
}

.admin-api-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #555e6e;
  background: #e8ecf2;
  border: 1px solid #c8d0dc;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.admin-api-copy-btn:hover {
  background: #d0d7e6;
  color: #1e2330;
}

.admin-api-copy-btn.copied {
  background: #d4edda;
  border-color: #9ecfab;
  color: #1a6e33;
}

.admin-api-example-code {
  margin: 0;
  padding: 10px 12px;
  background: #1e2330;
  color: #c9d1d9;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
  tab-size: 2;
}

.admin-advanced-warning .home-message-body p {
  margin: 0;
}

.admin-advanced-mypay-form {
  margin-top: 12px;
}

.admin-advanced-e015-form {
  margin-top: 12px;
  grid-template-columns: 1fr;
}

.admin-advanced-e015-block {
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  background: #fbfdff;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 12px;
}

.admin-advanced-e015-block legend {
  padding: 0 6px;
  font-weight: 700;
  color: #1f3b53;
}

.admin-advanced-e015-block label {
  margin: 0;
}

.admin-e015-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-e015-location-row .button-link {
  white-space: nowrap;
}

.admin-e015-refresh-button {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-e015-refresh-button svg {
  display: block;
}

.admin-advanced-general-form {
  margin-top: 12px;
}

.admin-advanced-general-form .admin-field-full {
  grid-column: 1 / -1;
}

.admin-general-section {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #d1d5db;
}

.admin-general-section:last-of-type {
  margin-bottom: 0;
}

.admin-general-section h4 {
  margin: 0;
  color: #1f3b53;
}

.admin-general-box-group {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  background: #fbfdff;
}

.admin-general-box-title {
  margin: 0;
  color: #1f3b53;
  font-size: 0.97rem;
}

.admin-general-box-settings {
  display: grid;
  gap: 10px;
}

.admin-general-i18n-group {
  display: grid;
  gap: 8px;
}

.admin-general-i18n-group-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f3b53;
}

.admin-general-i18n-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-general-i18n-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-general-lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #264766;
}

.admin-general-lang-badge img {
  width: 18px;
  height: auto;
}

.admin-general-box-settings.is-disabled {
  opacity: 0.55;
}

.admin-general-box-settings.is-disabled input,
.admin-general-box-settings.is-disabled select,
.admin-general-box-settings.is-disabled button,
.admin-general-box-settings.is-disabled textarea {
  pointer-events: none;
}

.weather-alert-info-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 980px);
  margin: 0 auto 14px;
}

.weather-alert-info-update-header {
  width: min(100%, 980px);
  margin: 0 auto 10px;
  text-align: center;
}

.weather-alert-info-update-time {
  margin: 0 0 2px;
  font-size: 0.85rem;
  color: #5f6f80;
  font-weight: 500;
}

.weather-alert-info-update-source {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.weather-alert-info-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  text-align: left;
  gap: 10px;
  border: 1px solid #d7dfe8;
  border-radius: 10px;
  padding: 10px;
  background: #f9fbfd;
}

.weather-alert-info-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: currentColor;
  flex-shrink: 0;
}

.weather-alert-info-card-icon img,
.weather-alert-info-card-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) invert(1);
}

.weather-alert-info-card-body {
  min-width: 0;
}

.weather-alert-info-card-line {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.3;
  color: #243447;
}

.weather-alert-info-card-line + .weather-alert-info-card-line {
  margin-top: 2px;
}

.weather-alert-info-card-line-primary {
  font-weight: 700;
  font-size: 0.84rem;
}

#weather-alert-info-modal .modal-body {
  display: block;
}

#weather-alert-info-modal-body {
  width: 100%;
}

.weather-alert-info-card.tone-neutral {
  color: #95a4b3;
}

.weather-alert-info-card.tone-green {
  color: #3b944f;
}

.weather-alert-info-card.tone-yellow {
  color: #d2ad32;
}

.weather-alert-info-card.tone-orange {
  color: #d67a2a;
}

.weather-alert-info-card.tone-red {
  color: #b03232;
}

@media (max-width: 980px) {
  .weather-alert-info-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .weather-alert-info-cards {
    grid-template-columns: 1fr;
  }
}

.weather-alert-info-modal-footer {
  justify-content: flex-end;
}

.admin-advanced-mypay-form .admin-field-full {
  grid-column: 1 / -1;
}

.admin-advanced-db-form .admin-field-full {
  grid-column: 1 / -1;
}

.admin-advanced-mypay-form .admin-toolbar {
  justify-content: flex-end;
}

.admin-checkbox-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.admin-checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0070c0;
}

.admin-general-media-block {
  display: grid;
  gap: 10px;
}

.admin-general-media-block h4 {
  margin: 0;
  color: #1f3b53;
}

.admin-general-media-preview-wrap {
  display: grid;
}

.admin-general-media-edit-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe1f3;
  border-radius: 10px;
  background: #f8fbff;
}

.admin-general-media-box-title {
  margin: 0;
  color: #1f3b53;
  font-size: 0.95rem;
}

.admin-general-media-preview {
  min-height: 220px;
  border: 1px solid #d6e4f1;
  border-radius: 10px;
  background: #f8fbff;
  display: grid;
  place-items: center;
  padding: 12px;
}

.admin-general-media-preview img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  border-radius: 8px;
  object-fit: contain;
}

.admin-general-media-preview img[hidden] {
  display: none !important;
}

.admin-general-media-upload-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #cfe1f3;
  border-radius: 10px;
  background: #f8fbff;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.admin-general-media-upload-box > .admin-general-media-box-title {
  flex: 1 1 100%;
}

.admin-general-media-upload-field {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin: 0;
  display: block;
  align-items: center;
}

.admin-general-media-upload-field input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-general-media-upload-field input[type="file"]::file-selector-button {
  max-width: 100%;
  margin-right: 8px;
  white-space: nowrap;
}

.admin-general-media-upload-box .admin-toolbar {
  margin: 0;
  flex: 1 1 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-general-media-upload-box .admin-toolbar .button-link {
  max-width: 100%;
}

.admin-general-media-edit-box .admin-general-media-upload-box .admin-toolbar {
  justify-content: flex-start;
}

.admin-general-media-edit-box .admin-general-media-upload-box .admin-toolbar .button-link {
  flex: 1 1 220px;
  min-width: 0;
}

.button-link.danger-button {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.button-link.danger-button:hover,
.button-link.danger-button:focus-visible {
  background: #9f1d1d;
  border-color: #9f1d1d;
}

.admin-permit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-permit-form .admin-field-full {
  grid-column: 1 / -1;
}

.admin-permit-form > label,
.admin-permit-multi-row > label {
  min-width: 0;
}

.admin-permit-form input,
.admin-permit-form select,
.admin-permit-form .admin-multiselect-dropdown,
.admin-permit-form .quantity-slider,
.admin-permit-multi-row input,
.admin-permit-multi-row select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-tariff-form,
.admin-track-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.admin-tariff-form {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.admin-tariff-form .admin-field-full {
  grid-column: 1 / -1;
}

.admin-multiselect-dropdown {
  position: relative;
  width: 100%;
  min-width: 0;
}

.admin-multiselect-toggle {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  background: #fff;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 400;
}

.admin-multiselect-toggle::after {
  content: "\25BE";
  margin-left: 10px;
  color: #6b7280;
}

.admin-multiselect-toggle:hover,
.admin-multiselect-toggle:focus {
  background: #fff;
  color: #111827;
}

.admin-multiselect-toggle:disabled {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.admin-multiselect-dropdown.is-open .admin-multiselect-toggle {
  border-color: #9ec5eb;
  box-shadow: 0 0 0 2px rgba(0, 112, 192, 0.12);
}

.admin-multiselect-list {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 6px;
}

.admin-multiselect-dropdown.is-open .admin-multiselect-list {
  display: block;
}

.admin-multiselect-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: 100%;
  text-align: left;
  gap: 8px;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.92rem;
}

.admin-multiselect-option input[type="checkbox"] {
  display: inline-block;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #0070c0;
}

.admin-multiselect-option span {
  display: inline-block;
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
  line-height: 1.2;
}

.admin-multiselect-option:hover {
  background: #f3f8ff;
}

.admin-multiselect-empty {
  padding: 6px;
  color: #6b7280;
  font-size: 0.9rem;
}

.admin-tariff-form .admin-tariff-max-permits {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-tariff-form .admin-tariff-max-permits .quantity-slider {
  width: min(360px, 100%);
}

.admin-tariff-form .admin-checkbox-field,
.modal-footer .admin-tariff-actions .admin-checkbox-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-weight: 600;
}

.admin-tariff-form .admin-checkbox-field input[type="checkbox"],
.modal-footer .admin-tariff-actions .admin-checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0070c0;
}

.admin-tariff-extra-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.admin-tariff-limited-section {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.admin-page .modal input[type="date"],
.admin-page .modal input[type="datetime-local"] {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: "Titillium Web", system-ui, -apple-system;
  font-size: 0.95rem;
  color: #222;
  min-height: 40px;
  width: 100%;
  background-color: #fff;
  -webkit-appearance: none;
  appearance: none;
}

.admin-page .modal textarea {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: "Titillium Web", system-ui, -apple-system;
  font-size: 0.95rem;
  color: #222;
  width: 100%;
  min-height: 40px;
  background-color: #fff;
  box-sizing: border-box;
  resize: vertical;
}

.admin-page .modal input[type="date"]::-webkit-calendar-picker-indicator,
.admin-page .modal input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0.75;
  cursor: pointer;
}

.admin-page .modal input[name="createdAt"]:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.admin-page .modal input[name="prefixAuto"]:disabled,
.admin-page .modal input[name="prefixMoto"]:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.admin-page .modal input[name="tariffAmount"][readonly] {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.admin-permit-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.admin-tariff-actions {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-tariff-active-inline {
  margin: 0;
  flex-shrink: 0;
}

.admin-tariff-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#tariff-form[data-mode="add"] #tariff-soft-delete {
  display: none !important;
}

.admin-permit-actions .danger-button {
  background: #b42318;
  border: 1px solid #b42318;
  color: #fff;
}

.admin-permit-multi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.admin-permit-multi-row:first-child {
  margin-top: 0;
}
  .admin-section-header {
    flex-wrap: wrap;
  }

.admin-permit-form #permit-vehicles-slider {
  width: 100%;
}

.admin-permit-form #permit-multi-vehicles {
  grid-column: 1 / -1;
  width: 100%;
}

.admin-password-field {
  position: relative;
  display: block;
  width: 100%;
}

.admin-password-field input {
  width: 100%;
  padding-right: 44px;
}

.admin-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.admin-password-toggle::before {
  content: "";
  width: 18px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 12px / 8px;
  box-sizing: border-box;
}

.admin-password-toggle::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.admin-password-toggle:hover {
  background: #eef4fb;
  color: #0b5fa5;
}

.admin-password-toggle:focus-visible {
  outline: 2px solid #0070c0;
  outline-offset: 2px;
}

.admin-password-toggle.is-active {
  color: #ffffff;
  background: #0070c0;
}

.admin-password-toggle.is-active:hover {
  background: #005a9e;
  color: #ffffff;
}

.visually-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;
}

.admin-permit-form #permit-vehicles-slider .quantity-step:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #d1d5db;
  opacity: 1;
  cursor: not-allowed;
}

.admin-permit-actions .danger-button:hover {
  background: #9f1d1d;
  border-color: #9f1d1d;
}

.admin-nav .button-link.logout-btn {
  background: #fff;
  color: #b42318;
  border: 1px solid #b42318;
  box-shadow: none;
}

.admin-nav .button-link.logout-btn:hover {
  background: #fff1f1;
  color: #9f1d1d;
  border-color: #9f1d1d;
}

@media (max-width: 980px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats-layout {
    grid-template-columns: 1fr;
  }

  .admin-stats-donuts-row {
    grid-template-columns: 1fr;
  }

  .admin-form-inline {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .admin-permit-form {
    grid-template-columns: 1fr;
  }

  .admin-permit-multi-row {
    grid-template-columns: 1fr;
  }

  .admin-advanced-text-row {
    grid-template-columns: 1fr;
  }

  .admin-advanced-text-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-general-media-upload-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-general-media-upload-box .admin-toolbar,
  .admin-general-media-edit-box .admin-general-media-upload-box .admin-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .admin-general-media-upload-box .admin-toolbar .button-link,
  .admin-general-media-edit-box .admin-general-media-upload-box .admin-toolbar .button-link {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    min-height: 40px;
    text-align: center;
  }

  .admin-general-media-upload-box {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-html-toolbar {
    gap: 4px;
  }

  .admin-html-toolbar-group-image {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    flex-wrap: wrap;
  }

  .managed-content-image,
  .managed-content-image--w-25,
  .managed-content-image--w-33,
  .managed-content-image--w-40,
  .managed-content-image--w-50,
  .managed-content-image--w-60,
  .managed-content-image--w-75,
  .managed-content-image--w-100,
  .managed-content-image--float-left,
  .managed-content-image--float-right {
    width: 100%;
    float: none;
    margin: 14px 0;
  }

  .admin-advanced-layout {
    grid-template-columns: 1fr;
  }

  .admin-page .container.admin-advanced-page-layout {
    grid-template-columns: 1fr;
  }

  .admin-advanced-sidebar {
    padding: 8px;
  }

  .admin-advanced-menu {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-advanced-menu li {
    flex: 1 1 220px;
  }

  .admin-tariff-form,
  .admin-track-form {
    grid-template-columns: 1fr;
  }

  .admin-advanced-e015-block {
    grid-template-columns: 1fr;
  }

  .admin-e015-location-row {
    grid-template-columns: 1fr;
  }

  .admin-tariff-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-tariff-actions-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  body.admin-page[data-page="gestione-permessi"] .admin-card-head,
  body.admin-page[data-page="gestione-accessi"] .admin-card-head,
  body.admin-page[data-page="gestione-varchi"] .admin-card-head,
  body.admin-page[data-page="gestione-tariffe"] .admin-card-head {
    flex-direction: row;
    align-items: center;
  }

  body.admin-page[data-page="gestione-permessi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestione-accessi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestore-permessi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestione-varchi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestione-tariffe"] .admin-card-head .admin-toolbar {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  body.admin-page[data-page="gestione-permessi"] .admin-card-head .admin-toolbar .button-link,
  body.admin-page[data-page="gestione-accessi"] .admin-card-head .admin-toolbar .button-link,
  body.admin-page[data-page="gestore-permessi"] .admin-card-head .admin-toolbar .button-link,
  body.admin-page[data-page="gestione-varchi"] .admin-card-head .admin-toolbar .button-link,
  body.admin-page[data-page="gestione-tariffe"] .admin-card-head .admin-toolbar .button-link {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  body.admin-page[data-page="gestione-permessi"] .admin-card-head .admin-toolbar .admin-toolbar-year-select {
    white-space: nowrap;
    padding: 10px 30px 10px 12px;
    font-size: 0.92rem;
  }

  body.admin-page[data-page="gestore-permessi"] .admin-card-head .admin-toolbar .admin-toolbar-year-select {
    white-space: nowrap;
    padding: 10px 30px 10px 12px;
    font-size: 0.92rem;
  }
}

@media (max-width: 640px) {
  .admin-form-inline {
    grid-template-columns: 1fr;
  }

  .admin-advanced-text-actions {
    padding: 12px;
    margin-top: 10px;
  }

  .admin-general-i18n-grid {
    grid-template-columns: 1fr;
  }

  .admin-general-media-upload-box .admin-toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .admin-general-media-upload-box .admin-toolbar .button-link {
    width: 100%;
    text-align: center;
  }

  .admin-general-media-edit-box .admin-general-media-upload-box .admin-toolbar .button-link {
    flex: 1 1 100%;
  }

  body.admin-page[data-page="gestione-permessi"] .admin-card-head,
  body.admin-page[data-page="gestione-accessi"] .admin-card-head,
  body.admin-page[data-page="gestione-varchi"] .admin-card-head,
  body.admin-page[data-page="gestione-tariffe"] .admin-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  body.admin-page[data-page="gestione-permessi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestione-accessi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestore-permessi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestione-varchi"] .admin-card-head .admin-toolbar,
  body.admin-page[data-page="gestione-tariffe"] .admin-card-head .admin-toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Modal styling */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 3000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  border: none;
  padding: 0;
  appearance: none;
  background-clip: padding-box;
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  width: min(92vw, 1200px);
  min-width: 0;
  max-height: 80vh;
  z-index: 3001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 480px) {
  .modal.active {
    align-items: flex-start;
    padding: 12px 8px;
  }

  .modal-content {
    width: calc(100vw - 16px);
    min-width: 0;
    max-height: calc(100vh - 24px);
    border-radius: 10px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .modal-header h2 {
    font-size: 1.2rem;
    padding-right: 8px;
  }
}

@media (max-width: 919px) {
  .admin-page .modal.active {
    align-items: flex-start;
    padding: 14px 8px;
  }

  .admin-page .modal-content {
    width: min(96vw, 900px);
    max-height: calc(100vh - 28px);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 3002;
  border-radius: 8px 8px 0 0;
}

.modal-header h2 {
  margin: 0;
  color: #0070c0;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2.1rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  transition: background-color 0.2s;
  line-height: 0;
  font-family: Arial, sans-serif;
}

.modal-close:hover {
  background-color: #e5e7eb;
  color: #000;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
  flex-shrink: 0;
  width: 100%;
}

.modal-footer .admin-permit-actions {
  width: 100%;
  grid-column: auto;
  margin-top: 0;
}

/* Styles for valle modal content */
#valle-modal .modal-body figure {
  margin: 0;
  grid-area: image;
  align-self: start;
}

#valle-modal .modal-body img {
  width: min(500px, 100%);
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

#valle-modal .modal-body figcaption {
  margin-top: 6px;
  color: #555;
  font-size: 0.95rem;
}

#valle-modal .modal-body .chapter {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 500px);
  grid-template-areas:
    "title image"
    "text image";
  column-gap: 22px;
  row-gap: 8px;
  align-items: start;
}

#valle-modal .modal-body .chapter h4 {
  grid-area: title;
  margin: 0;
  color: #0070c0;
  font-size: 1.15rem;
}

#valle-modal .modal-body .chapter p {
  grid-area: text;
  color: #333;
  line-height: 1.6;
  margin: 0;
}

#valle-modal .modal-body .chapter:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 900px) {
  #valle-modal .modal-body .chapter {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "text"
      "image";
    row-gap: 12px;
  }

  #valle-modal .modal-body img {
    width: min(340px, 100%);
  }
}

.modal-body h3 {
  color: #0070c0;
  margin: 20px 0 10px 0;
  font-size: 1.1rem;
}

.modal-body p,
.modal-body ul {
  color: #333;
  line-height: 1.6;
  margin: 10px 0;
}

.modal-body ul {
  margin-left: 20px;
}

.modal-body li {
  margin: 5px 0;
}

/* ============================================================
   GESTIONE ACCESSI — stili specifici
   ============================================================ */

/* Icona nav */
.admin-nav .button-link[data-page="gestione-accessi"]::before {
  --admin-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.1 14.3l1.1-3.1c.4-1.1 1.4-1.8 2.6-1.8h5.3c.8 0 1.6.3 2.2.9l2.2 2.3h1.6c1 0 1.8.8 1.8 1.8v1.5c0 .7-.6 1.3-1.3 1.3h-.9a2.4 2.4 0 0 1-4.6 0h-4.3a2.4 2.4 0 0 1-4.6 0h-.8c-.7 0-1.3-.6-1.3-1.3v-1z' fill='black'/%3E%3Ccircle cx='8.1' cy='16.7' r='1.3' fill='white'/%3E%3Ccircle cx='16.3' cy='16.7' r='1.3' fill='white'/%3E%3Cpath d='M7.1 11.5h6.3c.4 0 .8.2 1.1.5l1.3 1.3H6.3l.3-.8c.1-.6.3-1 .5-1z' fill='white'/%3E%3C/svg%3E");
}

/* Icona section title */
body.admin-page[data-page="gestione-accessi"] .admin-section-title::before {
  --admin-section-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.1 14.3l1.1-3.1c.4-1.1 1.4-1.8 2.6-1.8h5.3c.8 0 1.6.3 2.2.9l2.2 2.3h1.6c1 0 1.8.8 1.8 1.8v1.5c0 .7-.6 1.3-1.3 1.3h-.9a2.4 2.4 0 0 1-4.6 0h-4.3a2.4 2.4 0 0 1-4.6 0h-.8c-.7 0-1.3-.6-1.3-1.3v-1z' fill='black'/%3E%3Ccircle cx='8.1' cy='16.7' r='1.3' fill='white'/%3E%3Ccircle cx='16.3' cy='16.7' r='1.3' fill='white'/%3E%3Cpath d='M7.1 11.5h6.3c.4 0 .8.2 1.1.5l1.3 1.3H6.3l.3-.8c.1-.6.3-1 .5-1z' fill='white'/%3E%3C/svg%3E");
}

/* Box filtri azzurrino */
.admin-accessi-filters {
  background: #e8f4fd;
  border: 1px solid #bfdbf7;
  border-radius: 8px;
  padding: 16px 20px 14px;
  margin-bottom: 20px;
}

.admin-accessi-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 16px;
  margin-bottom: 12px;
}

.admin-accessi-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-accessi-filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e3a5f;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-accessi-filter-field input,
.admin-accessi-filter-field select {
  height: 34px;
  padding: 6px 10px;
  border: 1px solid #9ec5e8;
  border-radius: 4px;
  background: #fff;
  font-size: 0.85rem;
  color: #1e2330;
  line-height: 1.2;
  box-sizing: border-box;
}

.admin-accessi-filter-field input:focus,
.admin-accessi-filter-field select:focus {
  outline: none;
  border-color: #0070c0;
  box-shadow: 0 0 0 2px rgba(0, 112, 192, 0.15);
}

.admin-accessi-filters-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #bfdbf7;
  padding-top: 12px;
}

.admin-accessi-hint {
  font-size: 0.82rem;
  color: #3b6fa0;
  margin: 0;
  flex: 1;
}

.admin-accessi-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  font-weight: 600;
  background: #0070c0;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: background 0.15s;
}

.admin-accessi-search-btn:hover {
  background: #005a9e;
}

.admin-accessi-search-btn svg {
  width: 15px;
  height: 15px;
}

.admin-accessi-verify-action-btn {
  background: #0070c0;
  color: #fff;
  border: 1px solid #0070c0;
}

.admin-accessi-verify-action-btn:hover,
.admin-accessi-verify-action-btn:focus-visible {
  background: #005a9e;
  color: #fff;
  border-color: #005a9e;
}

.admin-accessi-status {
  margin: 0 0 12px;
  font-size: 0.88rem;
}

.admin-accessi-verify-modal-content {
  max-width: 640px;
  width: min(92vw, 640px);
}

.admin-accessi-verify-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.admin-accessi-verify-form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #1f2937;
  font-weight: 600;
}

.admin-accessi-verify-form select,
.admin-accessi-verify-form input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #c9d7ea;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
}

.admin-accessi-verify-form select:focus,
.admin-accessi-verify-form input:focus {
  outline: none;
  border-color: #0070c0;
  box-shadow: 0 0 0 2px rgba(0, 112, 192, 0.16);
}

.admin-accessi-verify-status,
.admin-accessi-verify-result {
  grid-column: 1 / -1;
}

.admin-accessi-verify-status {
  margin: 0;
}

.admin-accessi-verify-result {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  padding: 12px 14px;
}

.admin-accessi-verify-result.is-success {
  border-color: #9ecfab;
  background: #eef9f0;
}

.admin-accessi-verify-result.is-error {
  border-color: #f5a3a3;
  background: #fff1f1;
}

.admin-accessi-verify-result p {
  margin: 0;
  color: #1f2937;
  line-height: 1.4;
}

.admin-accessi-verify-result p + p {
  margin-top: 6px;
}

.admin-accessi-verify-result-title {
  font-weight: 700;
  color: #0f4f84;
}

/* Badge stato passaggio */
.access-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.access-status-auth {
  background: #d4edda;
  color: #1a6e33;
  border: 1px solid #9ecfab;
}

.access-status-noauth {
  background: #fde8e8;
  color: #991b1b;
  border: 1px solid #f5a3a3;
}

/* Cella "nessun risultato" */
.admin-table-empty {
  text-align: center;
  color: #888;
  padding: 24px !important;
  font-style: italic;
}

/* Responsive */
@media (max-width: 700px) {
  .admin-accessi-filters-grid {
    grid-template-columns: 1fr;
  }

  .admin-accessi-filters-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-accessi-search-btn {
    justify-content: center;
  }

  .admin-accessi-verify-form {
    grid-template-columns: 1fr;
  }
}
