/* ==========================================================
   GESTIONALE WALTER NCC - struttura "app", mobile-first
   Mobile: barra in alto + barra schede in basso. Desktop (>=1024px): menu laterale.
   ========================================================== */

.adm-body { background: #F4F2EF; min-height: 100vh; }
.adm { min-height: 100vh; }
:root {
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Menu laterale (desktop) ---------- */
.adm-side { display: none; }
@media (min-width: 1024px) {
  .adm { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
  .adm-side {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--blue);
    color: var(--white);
    padding: 22px 14px 18px;
  }
}
.adm-side-brand { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 22px; text-decoration: none !important; border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 14px; }
.adm-side-brand img { width: 128px; height: auto; }
.adm-side-brand span { color: var(--beige); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
.adm-side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adm-side-nav a, .adm-side-foot a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72) !important;
  text-decoration: none !important;
  font-size: 0.95rem;
  position: relative;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.adm-side-nav a i, .adm-side-foot a i { width: 20px; text-align: center; color: rgba(197, 169, 137, 0.8); }
.adm-side-nav a:hover, .adm-side-foot a:hover { background: rgba(255, 255, 255, 0.06); color: var(--white) !important; }
.adm-side-nav a.is-active { background: rgba(197, 169, 137, 0.16); color: var(--white) !important; }
.adm-side-nav a.is-active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--beige); }
.adm-side-nav a.is-active i { color: var(--beige); }
.adm-side-nav .adm-count { margin-left: auto; }
.adm-side-foot { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 12px; }
.adm-user { margin: 8px 12px 0; font-size: 0.75rem; color: rgba(255, 255, 255, 0.45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.adm-count {
  font-style: normal;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #C8473E;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Barra in alto ---------- */
.adm-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.adm-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 16px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 2px solid var(--beige);
}
.adm-top-icon { width: 34px; height: auto; }
@media (min-width: 1024px) { .adm-top-icon { display: none; } .adm-top { padding: 14px 32px; } }
.adm-title { font-size: 1.3rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1024px) { .adm-title { font-size: 1.6rem; } }
.adm-back {
  width: 40px; height: 40px;
  margin-left: -8px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue) !important;
  text-decoration: none !important;
  transition: background 0.2s var(--ease);
}
.adm-back:hover, .adm-back:active { background: var(--beige-20); }

/* ---------- Contenuto ---------- */
.adm-content {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  flex: 1;
}
@media (min-width: 1024px) { .adm-content { padding: 28px 32px 60px; } }

.adm-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 0.92rem; }
.adm-alert i { margin-top: 3px; }
.adm-alert-danger { background: rgba(200, 71, 62, 0.08); border: 1px solid rgba(200, 71, 62, 0.3); color: #9E3730; }
.adm-alert-danger a { color: #9E3730; font-weight: 500; }

.adm-toast {
  position: fixed;
  left: 50%;
  top: calc(66px + env(safe-area-inset-top));
  z-index: 60;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.92rem;
  box-shadow: 0 14px 30px rgba(30, 56, 69, 0.3);
  animation: toastIn 0.5s var(--ease) both;
}
.adm-toast i { color: var(--beige); }
.adm-toast.is-hiding { animation: toastOut 0.4s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, -16px); } }

/* ---------- Oggi ---------- */
.adm-hello { margin: 4px 0 16px; }
.adm-hello h2 { font-size: 1.8rem; margin: 0; }
.adm-hello-date { margin: 0 0 2px; color: var(--beige-text); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }

.adm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.adm-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none !important;
  color: var(--blue) !important;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.adm-stat:active { transform: scale(0.98); }
a.adm-stat:hover { box-shadow: var(--shadow); }
.adm-stat.is-alert { background: var(--blue); color: var(--white) !important; border-color: var(--blue); }
.adm-stat.is-alert .adm-stat-label { color: rgba(255, 255, 255, 0.75); }
.adm-stat-value { font-family: var(--font-title); font-size: 1.9rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.adm-stat.is-alert .adm-stat-value { color: var(--beige); }
.adm-stat-money { font-size: 1.15rem; line-height: 1.7rem; }
.adm-stat-label { font-size: 0.78rem; color: var(--text-muted); line-height: 1.25; }
@media (min-width: 640px) { .adm-stat { padding: 18px; } .adm-stat-money { font-size: 1.6rem; } .adm-stat-label { font-size: 0.85rem; } }

.adm-section { margin-bottom: 28px; }
.adm-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.adm-section-head h3 { font-size: 1.3rem; margin: 0; }
.adm-section-head a { font-size: 0.88rem; font-weight: 500; }
.adm-day-label { margin: 18px 0 8px; font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--beige-text); }
.adm-day-label:first-child { margin-top: 0; }

.adm-empty { text-align: center; padding: 34px 20px; background: var(--white); border: 1px dashed var(--border); border-radius: 14px; color: var(--text-muted); }
.adm-empty i { font-size: 1.8rem; color: var(--beige); margin-bottom: 8px; }
.adm-empty p { margin: 0; }

/* ---------- Schede richiesta ---------- */
.bk-list { display: flex; flex-direction: column; gap: 10px; }
.bk-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px 12px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 14px;
  text-decoration: none !important;
  color: var(--text) !important;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bk-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.bk-card:active { transform: scale(0.985); }
.bk-pending { border-left-color: var(--beige); }
.bk-confirmed { border-left-color: var(--success); }
.bk-rejected { border-left-color: rgba(179, 65, 58, 0.5); opacity: 0.75; }
.bk-when {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  border-radius: 10px;
  background: var(--beige-20);
  line-height: 1.1;
}
.bk-dow { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--beige-text); font-weight: 500; }
.bk-day { font-family: var(--font-title); font-size: 1.45rem; font-weight: 600; color: var(--blue); }
.bk-month { font-size: 0.7rem; color: var(--text-muted); }
.bk-time { margin-top: 3px; font-size: 0.78rem; font-weight: 500; color: var(--blue); }
.bk-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bk-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-service { font-size: 0.78rem; color: var(--beige-text); font-weight: 500; }
.bk-service i { margin-right: 3px; }
.bk-summary { font-weight: 500; color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-client { font-size: 0.85rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-client i { margin-right: 3px; }
.bk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bk-price { font-weight: 500; color: var(--blue); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-side .badge { font-size: 0.7rem; padding: 3px 8px; }
@media (max-width: 380px) {
  .bk-card { grid-template-columns: 52px minmax(0, 1fr); }
  .bk-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Ricerca e filtri ---------- */
.adm-search { position: relative; margin-bottom: 12px; }
.adm-search > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.adm-search input[type="search"] { width: 100%; min-height: 48px; border: 1px solid var(--border); font-size: 1rem; font-family: var(--font); color: var(--text); padding-left: 42px; padding-right: 42px; border-radius: 12px; background: var(--white); -webkit-appearance: none; appearance: none; }
.adm-search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-muted) !important; }

.adm-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 4px; scrollbar-width: none; }
.adm-chips::-webkit-scrollbar { display: none; }
.adm-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 19px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--blue) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.adm-chip em { font-style: normal; font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.adm-chip.has-alert em { color: #C8473E; font-weight: 500; }
.adm-chip.is-active { background: var(--blue); border-color: var(--blue); color: var(--white) !important; }
.adm-chip.is-active em { color: var(--beige); }

/* ---------- Scheda richiesta (dettaglio) ---------- */
.bd-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bd-service { margin-left: auto; font-size: 0.85rem; color: var(--beige-text); font-weight: 500; }
.bd-when { background: var(--blue); color: var(--white); border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
.bd-when p { margin: 0; }
.bd-when-rel { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--beige); min-height: 1em; }
.bd-when-date { font-family: var(--font-title); font-size: 1.45rem; font-weight: 600; margin: 2px 0 4px !important; }
.bd-when-time { font-size: 1.05rem; color: rgba(255, 255, 255, 0.85); }
.bd-when-time i { color: var(--beige); margin-right: 4px; }

.bd-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.bd-card h3 { font-family: var(--font); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--beige-text); margin: 0 0 10px; }
.bd-client-name { font-family: var(--font-title); font-size: 1.35rem; font-weight: 600; color: var(--blue); margin: 0 0 12px; }
.bd-contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.bd-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 68px;
  border-radius: 12px;
  background: var(--beige-20);
  color: var(--blue) !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}
.bd-contact i { font-size: 1.25rem; }
.bd-contact:active { transform: scale(0.96); }
.bd-contact:hover { background: var(--beige); }
.bd-wa { background: rgba(37, 211, 102, 0.12); color: #128C4B !important; }
.bd-wa:hover { background: rgba(37, 211, 102, 0.22); }
.bd-muted { font-size: 0.85rem; color: var(--text-muted); margin: 0; word-break: break-word; }

.bd-rows { margin: 0; }
.bd-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.bd-rows > div:last-child { border-bottom: none; }
.bd-rows dt { color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; }
.bd-rows dt i { width: 18px; color: var(--beige-text); margin-right: 4px; text-align: center; }
.bd-rows dd { margin: 0; text-align: right; font-weight: 500; color: var(--blue); word-break: break-word; }
.bd-total { font-family: var(--font-title); font-size: 1.35rem; }
.bd-notes { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--beige-10); border: 1px solid var(--beige-20); font-size: 0.92rem; }
.bd-notes i { color: var(--beige-text); margin-right: 4px; }
.bd-maps { margin-top: 14px; }

.bd-actions {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  padding: 10px;
  margin: 18px -6px 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(30, 56, 69, 0.16);
}
@media (min-width: 1024px) { .bd-actions { bottom: 20px; } }
.bd-actions .btn { min-height: 52px; font-size: 0.95rem; }
.btn-success { background: var(--success); color: var(--white) !important; border-color: var(--success); }
.btn-success:hover { background: #276B45; }
.bd-actions .btn-danger { background: var(--white); }

/* ---------- Finestre di conferma ---------- */
.adm-dialog {
  border: none;
  padding: 0;
  width: min(440px, calc(100% - 24px));
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(22, 42, 52, 0.35);
  color: var(--text);
}
.adm-dialog::backdrop { background: rgba(22, 42, 52, 0.45); backdrop-filter: blur(3px); }
.adm-dialog[open] { animation: dialogIn 0.35s var(--ease); }
.adm-dialog form { padding: 22px 20px 18px; }
.adm-dialog h3 { font-size: 1.35rem; margin: 0 0 8px; }
.adm-dialog p { margin: 0 0 6px; }
.adm-dialog textarea { margin-top: 4px; }
.adm-dialog-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 18px; }
.adm-dialog-actions .btn { min-height: 50px; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .adm-dialog { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; padding-bottom: var(--safe-b); }
  @keyframes dialogIn { from { transform: translateY(100%); } to { transform: none; } }
}

/* ---------- Barra schede in basso (mobile) ---------- */
.adm-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(30, 56, 69, 0.06);
}
@media (min-width: 1024px) { .adm-tabbar { display: none; } }
.adm-tabbar a, .adm-tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.72rem;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.adm-tab-icon { position: relative; width: 48px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 15px; font-size: 1.1rem; transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.adm-tab-icon .adm-count { position: absolute; top: -5px; left: 29px; min-width: 18px; height: 18px; font-size: 0.65rem; border: 2px solid var(--white); box-sizing: content-box; }
.adm-tabbar .is-active { color: var(--blue) !important; font-weight: 500; }
.adm-tabbar .is-active .adm-tab-icon { background: var(--beige-20); color: var(--blue); }

/* ---------- Pannello "Altro" ---------- */
.adm-sheet { position: fixed; inset: 0; z-index: 70; }
.adm-sheet[hidden] { display: none; }
.adm-sheet-backdrop { position: absolute; inset: 0; background: rgba(22, 42, 52, 0.45); animation: fadeIn 0.25s ease both; }
.adm-sheet-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--white);
  border-radius: 22px 22px 0 0;
  padding: 10px 12px calc(16px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: sheetUp 0.4s var(--ease) both;
}
.adm-sheet.is-closing .adm-sheet-panel { animation: sheetDown 0.25s ease both; }
.adm-sheet.is-closing .adm-sheet-backdrop { animation: fadeOut 0.25s ease both; }
.adm-sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 10px; }
.adm-sheet-panel a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--blue) !important;
  text-decoration: none !important;
  font-size: 1rem;
}
.adm-sheet-panel a i { width: 22px; text-align: center; color: var(--beige-text); }
.adm-sheet-panel a:active, .adm-sheet-panel a:hover, .adm-sheet-panel a.is-active { background: var(--beige-20); }
.adm-sheet-logout { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 !important; color: #9E3730 !important; }
.adm-sheet-logout i { color: #9E3730 !important; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes fadeOut { to { opacity: 0; } }

/* Le altre pagine del gestionale (prezzi, tour...) dentro la nuova struttura */
.adm-content > .card, .adm-content > form > .card { border-radius: 16px; }
.adm-content .alert { border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  .adm-toast, .adm-dialog[open], .adm-sheet-panel, .adm-sheet-backdrop { animation: none !important; }
}

/* Disponibilita' nella scheda richiesta */
.bd-when-until { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.bd-conflict { margin-top: -4px; }
.bd-conflict a { font-weight: 500; }

/* ==========================================================
   RIFINITURE INTERFACCIA
   ========================================================== */

/* Entrata morbida a cascata del contenuto */
.adm-content > * { animation: admIn 0.5s var(--ease) both; }
.adm-content > *:nth-child(2) { animation-delay: 0.04s; }
.adm-content > *:nth-child(3) { animation-delay: 0.08s; }
.adm-content > *:nth-child(4) { animation-delay: 0.12s; }
.adm-content > *:nth-child(5) { animation-delay: 0.16s; }
.adm-content > *:nth-child(n+6) { animation-delay: 0.2s; }
.bk-list > .bk-card { animation: admIn 0.45s var(--ease) both; }
.bk-list > .bk-card:nth-child(2) { animation-delay: 0.05s; }
.bk-list > .bk-card:nth-child(3) { animation-delay: 0.1s; }
.bk-list > .bk-card:nth-child(n+4) { animation-delay: 0.15s; }
@keyframes admIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.adm-content > .adm-toast { animation: toastIn 0.5s var(--ease) both; }

/* Tocco: risposta immediata ai pulsanti */
.adm-content .btn:active, .bd-contact:active, .adm-chip:active { transform: scale(0.97); }
.adm-tabbar a:active .adm-tab-icon, .adm-tabbar button:active .adm-tab-icon { transform: scale(0.9); }
.adm-tab-icon { transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.15s var(--ease); }
.adm-tabbar .is-active .adm-tab-icon { animation: tabPop 0.35s var(--ease); }
@keyframes tabPop { 0% { transform: scale(0.85); } 60% { transform: scale(1.06); } 100% { transform: none; } }

/* Oggi: saluto su fondo blu */
.adm-hello {
  position: relative;
  overflow: hidden;
  margin: 0 0 14px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue) 0%, #264857 100%);
  color: var(--white);
}
.adm-hello::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(197, 169, 137, 0.25);
  box-shadow: 0 0 0 26px rgba(197, 169, 137, 0.05), 0 0 0 52px rgba(197, 169, 137, 0.035);
}
.adm-hello h2 { color: var(--white); position: relative; }
.adm-hello-date { color: var(--beige); position: relative; }

/* Oggi: prossimo servizio */
.adm-next {
  display: block;
  margin-bottom: 18px;
  padding: 16px 18px 16px 20px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(30, 56, 69, 0.08);
  position: relative;
  overflow: hidden;
}
.adm-next::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--success); }
.adm-next.is-now::before { background: var(--beige); animation: nowPulse 2s ease-in-out infinite; }
@keyframes nowPulse { 50% { opacity: 0.4; } }
.adm-next-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.adm-next-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--beige-text); font-weight: 500; }
.adm-next-countdown { font-size: 0.85rem; font-weight: 500; color: var(--success); background: rgba(47, 125, 82, 0.1); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.adm-next.is-now .adm-next-countdown { color: var(--beige-text); background: var(--beige-20); }
.adm-next-time { font-family: var(--font-title); font-size: 1.6rem; font-weight: 600; color: var(--blue); line-height: 1.1; }
.adm-next-time small { font-family: var(--font); font-size: 0.85rem; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.adm-next-summary { margin: 6px 0 2px; font-weight: 500; color: var(--blue); }
.adm-next-client { margin: 0 0 12px; font-size: 0.9rem; color: var(--text-muted); }
.adm-next-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adm-next-actions a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border-radius: 10px;
  background: var(--beige-20); color: var(--blue) !important;
  text-decoration: none !important; font-size: 0.88rem; font-weight: 500;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.adm-next-actions a:hover { background: var(--beige); }
.adm-next-actions a:active { transform: scale(0.96); }

/* Statistiche con icona */
.adm-stat { position: relative; }
.adm-stat-icon { position: absolute; top: 12px; right: 12px; font-size: 0.85rem; color: var(--beige); opacity: 0.9; }
@media (max-width: 479px) { .adm-stat-icon { display: none; } }

/* ---------- Pagine Prezzi, Tour, Veicoli, Guide, Impostazioni ---------- */
.adm-content .card {
  border-radius: 16px;
  padding: 18px;
  box-shadow: none;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
@media (min-width: 640px) { .adm-content .card { padding: 22px 24px; } }
.adm-content .card h3 { font-size: 1.2rem; }
.adm-content .section-title { margin-bottom: 12px; }
.adm-content fieldset { border: none; padding: 0; margin: 0 0 18px; }
.adm-content fieldset > legend {
  padding: 0;
  margin-bottom: 12px;
  font-family: var(--font);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--beige-text);
}
.adm-content label { font-size: 0.88rem; }
.adm-content label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; }
.adm-content input[type="checkbox"] { width: 20px !important; height: 20px; min-height: 0; accent-color: var(--blue); }

/* Schede di navigazione a pillola (Transfer / Auto / Tour) */
.adm-content .tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: none;
  border-radius: 14px;
  background: rgba(30, 56, 69, 0.07);
}
.adm-content .tabs a {
  margin: 0;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  text-align: center;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.adm-content .tabs a.active { background: var(--white); color: var(--blue) !important; box-shadow: 0 2px 8px rgba(30, 56, 69, 0.12); }

/* ---------- Elenchi modificabili (prezzi, tour, veicoli, guide) ---------- */
.ed-section { margin-bottom: 24px; }
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ed-head h2 { font-size: 1.3rem; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-intro { margin: 0 0 10px; color: var(--text-muted); font-size: 0.92rem; }
.ed-none { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--white); border: 1px dashed var(--border); color: var(--text-muted); font-size: 0.9rem; }

.ed-add {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  border: none;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}
.ed-add i { color: var(--beige); font-size: 0.8rem; }
.ed-add:hover { background: var(--blue-dark); }
.ed-add:active { transform: scale(0.95); }

/* Riquadri con una cifra (tariffe singole) */
.ed-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ed-tiles-1 { grid-template-columns: 1fr; }
.ed-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--white);
  text-align: left;
  font-family: var(--font);
  color: var(--blue);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.ed-tile:hover { border-color: var(--beige); box-shadow: var(--shadow); }
.ed-tile:active { transform: scale(0.98); }
.ed-tile-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--beige-text); font-weight: 500; }
.ed-tile-value { font-family: var(--font-title); font-size: 1.8rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ed-tile-hint { font-size: 0.8rem; color: var(--text-muted); }
.ed-tile-edit { position: absolute; top: 14px; right: 14px; font-size: 0.8rem; color: var(--beige-text); }

/* Elenco a righe, in un unico riquadro con divisori */
.ed-list { background: var(--white); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.ed-item {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s var(--ease);
}
.ed-list > .ed-item:first-child { border-top: none; }
.ed-item:hover { background: var(--beige-10); }
.ed-item:active { background: var(--beige-20); }
.ed-item.is-off .ed-item-main, .ed-item.is-off .ed-item-icon { opacity: 0.5; }
.ed-item-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--beige-20); color: var(--beige-text); display: flex; align-items: center; justify-content: center; }
.ed-item-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-item-main strong { font-weight: 500; color: var(--blue); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.ed-item-main strong i { font-size: 0.75em; color: var(--beige-text); margin: 0 3px; }
.ed-item-main small { font-size: 0.82rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-item-value { font-family: var(--font-title); font-size: 1.15rem; font-weight: 600; color: var(--blue); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ed-item-value.is-muted { font-family: var(--font); font-size: 0.82rem; font-weight: 400; color: var(--text-muted); }
.ed-item-go { color: var(--border); font-size: 0.8rem; }
.ed-item:hover .ed-item-go { color: var(--beige-text); }
.ed-tag { font-size: 0.7rem; font-weight: 500; padding: 3px 8px; border-radius: 99px; background: var(--beige-20); color: var(--beige-text); white-space: nowrap; }
.ed-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.9rem; font-weight: 500; text-decoration: none; }

/* Pannello di modifica */
.ed-dialog h3 { margin-bottom: 16px; }
.ed-dialog .form-group { margin-bottom: 14px; }
.ed-dialog .form-row { gap: 12px; }
.ed-dialog .form-row .form-group { margin-bottom: 14px; }
.ed-dialog .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.ed-dialog input[type="text"], .ed-dialog input[type="number"], .ed-dialog textarea { font-size: 1.05rem; }
.ed-money { position: relative; }
.ed-money input { padding-right: 56px; }
.ed-money span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; pointer-events: none; }
.ed-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(30, 56, 69, 0.07); }
.ed-seg label { margin: 0; cursor: pointer; }
.ed-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ed-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 9px; font-size: 0.95rem; color: var(--text-muted); transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.ed-seg input:checked + span { background: var(--white); color: var(--blue); font-weight: 500; box-shadow: 0 2px 8px rgba(30, 56, 69, 0.12); }
.ed-seg input:focus-visible + span { outline: 3px solid var(--beige); }

.ed-switch { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 4px 0 0; cursor: pointer; font-size: 0.98rem; color: var(--blue); }
.ed-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ed-switch-track { position: relative; flex-shrink: 0; width: 50px; height: 30px; border-radius: 15px; background: rgba(30, 56, 69, 0.2); transition: background 0.25s var(--ease); }
.ed-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25); transition: transform 0.25s var(--ease); }
.ed-switch input:checked + .ed-switch-track { background: var(--success); }
.ed-switch input:checked + .ed-switch-track::after { transform: translateX(20px); }
.ed-switch input:focus-visible + .ed-switch-track { outline: 3px solid var(--beige); outline-offset: 2px; }

.ed-delete { padding: 0 20px 18px; }
.ed-delete[hidden] { display: none; }
.ed-delete-btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  color: #B3413A;
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.ed-delete-btn i { margin-right: 6px; }
.ed-delete.is-armed .ed-delete-btn { background: #B3413A; color: var(--white); border-radius: 12px; border-top-color: transparent; animation: popIn 0.25s var(--ease); }

/* ---------- Tour: catalogo e pagina di modifica ---------- */
.tr-upgrade {
  display: flex;
  gap: 16px;
  padding: 18px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue) 0%, #264857 100%);
  color: rgba(255, 255, 255, 0.85);
}
.tr-upgrade > i { font-size: 1.5rem; color: var(--beige); margin-top: 4px; }
.tr-upgrade h2 { color: var(--white); font-size: 1.25rem; margin: 0 0 6px; }
.tr-upgrade p { margin: 0 0 12px; font-size: 0.92rem; }
.tr-upgrade a { color: var(--beige); }
.tr-thumb { background-size: cover; background-position: center; }
.ed-tag-gold { background: var(--beige); color: var(--blue); }
.ed-tag-gold i { font-size: 0.65rem; }
a.ed-item { text-decoration: none !important; }

.te-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
@media (min-width: 640px) { .te-card { padding: 22px 24px; } }
.te-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.te-head h2 { font-size: 1.25rem; margin: 0; }
.te-head h2 i { font-size: 0.9em; margin-right: 4px; }
.te-included .te-head h2 i { color: var(--success); }
.te-excluded .te-head h2 i { color: #B3413A; }
.te-hint { font-size: 0.8rem; color: var(--text-muted); text-align: right; }
.te-hint-link { font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.te-counter { text-align: right; }
.te-narrow { max-width: 180px; }

/* Foto */
.te-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .te-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } }
.te-photo, .te-photo-add {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--beige-20);
}
.te-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.2s; }
.te-photo:first-child { grid-column: span 2; grid-row: span 2; }
.te-cover-badge {
  position: absolute; left: 8px; top: 8px;
  padding: 4px 9px; border-radius: 99px;
  background: rgba(30, 56, 69, 0.85); color: var(--white);
  font-size: 0.72rem; font-weight: 500;
}
.te-cover-badge i { color: var(--beige); font-size: 0.65rem; margin-right: 3px; }
.te-photo-actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.te-photo-actions button {
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: var(--blue);
  font-size: 0.85rem; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s var(--ease), background 0.2s;
}
.te-photo-actions button:active { transform: scale(0.9); }
.te-photo-actions [data-photo-act="cover"] i { color: var(--beige-text); }
.te-photo.is-armed [data-photo-act="delete"] { background: #B3413A; color: var(--white); width: auto; padding: 0 12px; border-radius: 17px; }
.te-photo.is-armed [data-photo-act="delete"]::after { content: ' Elimina'; font-family: var(--font); font-size: 0.78rem; font-weight: 500; }
.te-photo.is-busy img { opacity: 0.4; }
.te-photo.is-uploading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); }
.te-progress { width: 70%; height: 6px; border-radius: 3px; background: rgba(30, 56, 69, 0.12); overflow: hidden; }
.te-progress span { display: block; height: 100%; width: 0; background: var(--blue); transition: width 0.2s; }
.te-photo-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed rgba(197, 169, 137, 0.8);
  background: var(--beige-10);
  color: var(--beige-text); font-size: 0.85rem; font-weight: 500;
  cursor: pointer; margin: 0;
  transition: background 0.2s var(--ease);
}
.te-photo-add:hover { background: var(--beige-20); }
.te-photo-add i { font-size: 1.4rem; }
.te-photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.te-photo-add[hidden] { display: none; }
.te-photos > .te-photo-add:first-child { grid-column: 1 / -1; aspect-ratio: auto; min-height: 140px; }
.te-photo-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(179, 65, 58, 0.07); color: #9E3730; font-size: 0.9rem; }

/* Itinerario e liste */
.te-steps, .te-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.te-steps { counter-reset: step; }
.te-step { display: grid; grid-template-columns: 26px 104px minmax(0, 1fr) 40px; gap: 8px; align-items: center; counter-increment: step; }
.te-step::before {
  content: counter(step);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue); color: var(--beige);
  font-size: 0.8rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.te-step input[type="time"] { padding: 10px 8px; font-size: 0.95rem; }
@media (max-width: 420px) {
  .te-step { grid-template-columns: 26px minmax(0, 1fr) 40px; }
  .te-step input[type="time"] { grid-column: 2; }
  .te-step input[type="text"] { grid-column: 2; }
  .te-step .te-remove { grid-column: 3; grid-row: 1 / span 2; }
  .te-step::before { grid-row: 1 / span 2; }
}
.te-item { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.te-remove {
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: none; color: var(--text-muted);
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
.te-remove:hover { background: rgba(179, 65, 58, 0.08); color: #B3413A; }
.is-new { animation: admIn 0.3s var(--ease) both; }
.te-add {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px;
  border: 1.5px dashed rgba(197, 169, 137, 0.8); border-radius: 22px;
  background: none; color: var(--beige-text);
  font-family: var(--font); font-size: 0.92rem; font-weight: 500;
  cursor: pointer;
}
.te-add:hover { background: var(--beige-10); }
.te-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.te-suggest button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--white); color: var(--blue);
  font-family: var(--font); font-size: 0.85rem;
  cursor: pointer; transition: background 0.2s, opacity 0.2s, transform 0.15s;
}
.te-suggest button i { font-size: 0.7rem; color: var(--beige-text); }
.te-suggest button:active { transform: scale(0.95); }
.te-suggest button.is-used { opacity: 0.4; pointer-events: none; }
.te-suggest-other { border-style: dashed !important; }

.te-prices { list-style: none; margin: 0; padding: 0; }
.te-prices li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.te-prices li:last-child { border-bottom: none; }
.te-prices strong { font-family: var(--font-title); color: var(--blue); }

.te-savebar {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
  padding: 10px;
  margin: 18px -6px 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(30, 56, 69, 0.16);
}
@media (min-width: 1024px) { .te-savebar { bottom: 20px; } }
.te-savebar .btn { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; padding: 0 12px; }
.te-delete { margin-top: 26px; padding: 0; }

/* ---------- Conferma, acconto, aggiornamenti ---------- */
.badge-deposit { background: rgba(217, 169, 58, 0.14); color: #8A6410; border: 1px solid rgba(217, 169, 58, 0.45); }
.bk-confirmed { border-left-color: #D9A93A; }
.bk-paid { border-left-color: var(--success); }
.bd-pay { display: block; font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }
.bd-pay.is-ok { color: var(--success); }
.bd-pay.is-wait { color: #8A6410; }
.bd-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bd-share .btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.bd-cancel { margin: 4px 0 18px; padding: 0; }
.adm-alert-info { background: var(--beige-20); border: 1px solid var(--beige); color: var(--blue) !important; text-decoration: none !important; }
.adm-alert-info i { color: var(--beige-text); }
.up-item { border-top: 1px solid var(--border); }
.up-item:first-child { border-top: none; }
.up-item > summary { list-style: none; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.up-item > summary::-webkit-details-marker { display: none; }
.up-item[open] .ed-item-go { transform: rotate(180deg); }
.up-label { margin: 0 14px 6px; font-size: 0.8rem; color: var(--text-muted); }
.up-sql { margin: 0 14px 14px; padding: 12px; border-radius: 10px; background: #0F1D24; color: #E7DCCD; font-size: 0.75rem; white-space: pre-wrap; word-break: break-word; }

/* ---------- Pagina di accesso ---------- */
.adm-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(800px 500px at 110% -10%, rgba(197, 169, 137, 0.18), transparent 60%),
    radial-gradient(600px 400px at -10% 110%, rgba(197, 169, 137, 0.12), transparent 60%),
    var(--blue);
}
.adm-login-box { width: 100%; max-width: 400px; animation: admIn 0.6s var(--ease) both; }
.adm-login-brand { text-align: center; margin-bottom: 26px; }
.adm-login-brand img { width: 170px; height: auto; }
.adm-login-brand p { margin: 10px 0 0; color: var(--beige); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; }
.adm-login-card { background: var(--white); border-radius: 20px; padding: 26px 22px 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25); }
.adm-login-card h1 { font-size: 1.6rem; margin: 0 0 4px; }
.adm-login-card > p { margin: 0 0 20px; color: var(--text-muted); font-size: 0.92rem; }
.adm-login-card .btn { min-height: 52px; margin-top: 6px; }
.adm-login-foot { text-align: center; margin-top: 18px; }
.adm-login-foot a { color: rgba(255, 255, 255, 0.7) !important; font-size: 0.85rem; text-decoration: none; }
.adm-login-foot a:hover { color: var(--white) !important; }
.adm-pass { position: relative; }
.adm-pass input { padding-right: 52px; }
.adm-pass button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; background: none; border-radius: 50%;
  color: var(--text-muted); cursor: pointer;
}
.adm-pass button:hover { color: var(--blue); background: var(--beige-20); }

@media (prefers-reduced-motion: reduce) {
  .adm-content > *, .bk-list > .bk-card, .adm-login-box, .adm-next.is-now::before, .adm-tabbar .is-active .adm-tab-icon { animation: none !important; }
}

/* ---------- Report ---------- */
.rp-period { margin: -6px 0 14px; font-size: 0.85rem; color: var(--text-muted); }
.rp-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 900px) { .rp-kpis { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.rp-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--white); border: 1px solid var(--border); }
.rp-kpi-main { grid-column: 1 / -1; background: var(--blue); border-color: var(--blue); }
.rp-kpi:last-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .rp-kpi-main, .rp-kpi:last-child { grid-column: auto; } }
.rp-kpi-label { font-size: 0.78rem; color: var(--text-muted); line-height: 1.3; }
.rp-kpi-value { font-family: var(--font-title); font-size: 1.45rem; font-weight: 600; color: var(--blue); line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rp-kpi-sub { font-size: 0.78rem; color: var(--text-muted); }
.rp-kpi-main .rp-kpi-label, .rp-kpi-main .rp-kpi-sub { color: rgba(255, 255, 255, 0.72); }
.rp-kpi-main .rp-kpi-value { color: var(--white); font-size: 1.9rem; }
.bd-card h3 small { text-transform: none; letter-spacing: 0; color: var(--text-muted); font-size: 0.78rem; margin-left: 6px; }
.rp-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .rp-status { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rp-status a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #F8F6F3; text-decoration: none !important; color: var(--blue) !important; }
.rp-status strong { font-family: var(--font-title); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.rp-bars { display: flex; flex-direction: column; gap: 14px; }
.rp-bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 0.9rem; color: var(--blue); margin-bottom: 6px; }
.rp-bar-head i { color: var(--beige-text); width: 18px; text-align: center; }
.rp-bar-head span:last-child { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-bar-head strong { color: var(--blue); }
.rp-bar-track { height: 10px; border-radius: 4px; background: #F1EDE7; }
.rp-bar-fill { height: 100%; border-radius: 4px; background: var(--blue); }
.rp-chart { position: relative; padding-top: 18px; }
.rp-chart-max { position: absolute; top: 0; left: 0; font-size: 0.72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rp-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 170px; border-top: 1px dashed var(--border); padding-top: 2px; }
.rp-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; min-width: 0; outline: none; padding-bottom: 20px; }
.rp-col-bar { border-radius: 4px 4px 0 0; background: var(--beige); min-height: 0; transition: background 0.15s; }
.rp-col.is-current .rp-col-bar { background: var(--blue); }
.rp-col:hover .rp-col-bar, .rp-col:focus-visible .rp-col-bar { background: var(--beige-text); }
.rp-col.is-current:hover .rp-col-bar, .rp-col.is-current:focus-visible .rp-col-bar { background: #2b4f61; }
.rp-col::after { content: ""; position: absolute; left: 0; right: 0; bottom: 20px; height: 1px; background: var(--border); }
.rp-col-label { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 0.68rem; color: var(--text-muted); }
.rp-tip { display: none; position: absolute; bottom: calc(100% - 10px); left: 50%; transform: translateX(-50%); z-index: 2; padding: 6px 10px; border-radius: 8px; background: var(--blue); color: rgba(255, 255, 255, 0.85); font-size: 0.75rem; line-height: 1.35; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(30, 56, 69, 0.2); }
.rp-tip strong { color: var(--white); }
.rp-col:hover .rp-tip, .rp-col:focus-visible .rp-tip { display: block; }
.rp-col:first-child .rp-tip, .rp-col:nth-child(2) .rp-tip { left: 0; transform: none; }
.rp-col:last-child .rp-tip, .rp-col:nth-child(11) .rp-tip { left: auto; right: 0; transform: none; }
.rp-table { margin-top: 10px; font-size: 0.88rem; }
.rp-table summary { cursor: pointer; color: var(--beige-text); font-weight: 500; }
.rp-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rp-table td, .rp-table th { padding: 6px 0; border-bottom: 1px solid var(--border); text-align: left; }
.rp-table th { font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.rp-table :is(td, th):nth-child(2), .rp-table :is(td, th):nth-child(3) { text-align: right; }
.rp-list { list-style: none; margin: 0; padding: 0; counter-reset: rp; }
.rp-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); counter-increment: rp; color: var(--blue); }
.rp-list li:last-child { border-bottom: none; }
.rp-list li span { min-width: 0; overflow-wrap: anywhere; }
.rp-list li span::before { content: counter(rp) "."; color: var(--beige-text); margin-right: 8px; font-variant-numeric: tabular-nums; }
.rp-list small { color: var(--text-muted); margin-left: 4px; }
.rp-list strong { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Pagamenti SumUp nella scheda della richiesta */
.bd-payments { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.85rem; }
.bd-payments li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--border); color: var(--text-muted); }
.bd-payments strong { font-weight: 500; color: var(--blue); }
.bd-payments li.is-paid strong { color: var(--success); }
.bd-payments li.is-failed strong, .bd-payments li.is-mismatch strong { color: #B3413A; }

/* Impostazioni: email di prova */
.email-test { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.email-test-row { display: flex; flex-wrap: wrap; gap: 8px; }
.email-test-row input { flex: 1 1 220px; min-width: 0; }
.email-test-row .btn { flex: 1 0 auto; }
.adm-content details summary { cursor: pointer; color: var(--beige-text); font-size: 0.9rem; font-weight: 500; }
