/* Hub e overlay guida interattiva */
.app-guide-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 8px 24px;
}
.app-guide-page [hidden] { display: none !important; }
@media (min-width: 1025px) {
  html:not(.cap-native) .app-guide-topic-card[data-guide-device="mobile"] { display: none; }
}
@media (max-width: 1024px) {
  .app-guide-topic-card[data-guide-device="desktop"] { display: none; }
}
html.cap-native .app-guide-topic-card[data-guide-device="desktop"] { display: none; }
.app-guide-lead {
  margin: 0 0 16px;
  line-height: 1.5;
}
.app-guide-progress-banner {
  margin: 0 0 12px;
  font-size: 0.92rem;
}
.app-guide-topic-card__status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  line-height: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #334155;
  background: var(--bg, #0f172a);
  color: var(--muted, #94a3b8);
}
.app-guide-topic-card__status[data-status="in_progress"] {
  background: rgba(56, 189, 248, 0.10);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}
.app-guide-topic-card__status[data-status="completed"] {
  background: rgba(52, 211, 153, 0.10);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}
.app-guide-status-icon { display: block; flex: none; width: 20px; height: 20px; }
.app-guide-status-icon__progress, .app-guide-status-icon__done { display: none; }
[data-status="in_progress"] .app-guide-status-icon__progress,
[data-status="completed"] .app-guide-status-icon__done { display: block; }
.app-guide-topic-card.is-guide-completed {
  border-color: rgba(52, 211, 153, 0.35);
}
.app-guide-topic-card.is-guide-in-progress {
  border-color: rgba(56, 189, 248, 0.35);
}
.app-guide-reset-progress {
  font-size: 0.88rem;
}
.app-guide-toolbar {
  margin-bottom: 16px;
}
.app-guide-practice-callout { margin-bottom: 16px; }
.app-guide-search {
  width: 100%;
  margin-bottom: 12px;
}
.app-guide-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.app-guide-toolbar-hint {
  margin-right: auto;
}
.app-guide-topic-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}
.app-guide-topic-empty {
  grid-column: 1 / -1;
}
.app-guide-topic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  min-height: 0;
}
.app-guide-topic-card__content {
  flex: 1 1 auto;
  min-height: 0;
}
.app-guide-topic-card__head {
  padding-right: 32px;
  margin-bottom: 8px;
}
.app-guide-topic-card__category {
  display: inline-block;
  font-size: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 4px;
}
.app-guide-topic-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.app-guide-topic-card__summary {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.app-guide-topic-card__steps {
  margin: 0;
}
.app-guide-topic-card__actions {
  margin-top: auto;
  padding-top: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.app-guide-topic-card.u-hidden-by-search {
  display: none !important;
}

/* Demo scheda espandibile (hub) */
.app-guide-ux-demo {
  max-width: 520px;
}
.app-guide-ux-demo__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.app-guide-ux-demo__title {
  margin: 4px 0 0;
  font-size: 1.05rem;
}
.app-guide-ux-demo__body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #334155;
}

/* Pagina approfondimento */
.app-guide-article-page {
  max-width: 720px;
}
.app-guide-article-intro {
  line-height: 1.55;
  margin-bottom: 20px;
}
.app-guide-article-section {
  margin-bottom: 16px;
}
.app-guide-article-section__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.app-guide-article-section__body {
  line-height: 1.5;
  color: #cbd5e1;
}
.app-guide-article-section__body p {
  margin: 0 0 8px;
}
.app-guide-article-back {
  margin-top: 24px;
  text-align: center;
}

@media (max-width: 1024px) {
  .app-guide-topic-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .app-guide-topic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-guide-toolbar-hint {
    width: 100%;
    margin-right: 0;
  }
}
@media (max-width: 480px) {
  .app-guide-topic-list {
    grid-template-columns: 1fr;
  }
}

/* Overlay tour */
.app-guide-demo-confirm { z-index: 100110 !important; }
.app-guide-tour-root {
  position: fixed;
  /* Measurable by the positioning engine; the backdrop still covers the screen. */
  padding-top: max(env(safe-area-inset-top, 0px), var(--cap-status-inset, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  inset: 0;
  z-index: 100100;
  pointer-events: none;
  display: none !important;
}
.app-guide-tour-root.is-active {
  display: block !important;
  pointer-events: auto;
}
.app-guide-tour-root.is-interactive { pointer-events: none; }
.app-guide-tour-root.is-interactive .app-guide-tour-backdrop { pointer-events: none; }
.app-guide-tour-panel [hidden], .app-guide-exercise [hidden], .app-guide-exercise-dialog[hidden] { display: none !important; }
.app-guide-tour-panel #app-guide-tour-action-status { color: #7dd3fc; font-size: var(--text-sm); }
.app-guide-exercise { max-width: 720px; margin: 0 auto; }
.app-guide-exercise-dialog .modal-panel { width: min(480px, calc(100vw - 32px)); overflow-y: auto; }
.app-guide-exercise-dialog input { width: 100%; }
[data-app-guide-personale] [hidden] { display: none !important; }
[data-app-guide-report] [hidden], [data-app-guide-inbox] [hidden] { display: none !important; }
[data-app-guide-report] .ui-file-upload-ui { pointer-events: auto; }
.app-guide-scadenze-dialog[hidden], [data-app-guide-scadenze] [hidden] { display: none !important; }
.app-guide-scadenze-dialog .modal-panel { max-height: calc(100dvh - 32px); overflow-y: auto; }
.app-guide-tour-panel [data-guide-form-help] { display: none; }
@media (max-width: 1024px) {
  .app-guide-tour-root.is-form-step:not(.show-form-help) #app-guide-tour-meta,
  .app-guide-tour-root.is-form-step:not(.show-form-help) #app-guide-tour-body { display: none; }
  .app-guide-tour-root.is-form-step .app-guide-tour-panel [data-guide-form-help] { display: inline-block; padding: 4px 8px; margin-bottom: 6px; min-height: 28px; }
  .app-guide-tour-root.is-form-step #app-guide-tour-action-status { margin: 6px 0; }
  .app-guide-tour-root.is-form-step.has-keyboard .app-guide-tour-panel { padding: 10px; }
  .app-guide-tour-root.is-form-step.has-keyboard .app-guide-tour-panel h3 { font-size: 1rem; margin-bottom: 4px; }
  .overlay-modal.app-guide-scadenze-dialog.has-guide-form-panel,
  .overlay-modal.app-guide-exercise-dialog.has-guide-form-panel {
    align-items: flex-start !important;
    padding-top: var(--guide-form-top) !important;
    padding-bottom: var(--guide-form-bottom) !important;
  }
  .overlay-modal.app-guide-scadenze-dialog.has-guide-form-panel .modal-panel,
  .overlay-modal.app-guide-exercise-dialog.has-guide-form-panel .modal-panel {
    max-height: var(--guide-form-height);
    margin: 0 auto;
  }
}
.app-guide-tour-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(2, 6, 23, 0.55);
  pointer-events: auto;
}
.app-guide-tour-backdrop.is-dim-only {
  background: rgba(2, 6, 23, 0.65);
}
.app-guide-tour-backdrop.is-hidden-for-spotlight {
  opacity: 0;
  pointer-events: none;
}
[data-guide] {
  scroll-margin: 24px 16px 140px;
}
.app-guide-tour-spotlight {
  position: absolute;
  box-sizing: border-box;
  z-index: 1;
  border-radius: 10px;
  background: transparent;
  border: 2px solid #38bdf8;
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.35),
    0 0 0 9999px rgba(2, 6, 23, 0.58);
  pointer-events: none;
  /* Geometry follows scrolling directly; animation used to lag behind targets. */
}
.app-guide-tour-panel {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  max-width: 420px;
  margin: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  color: #e2e8f0;
  pointer-events: auto;
  touch-action: manipulation;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.app-guide-tour-actions .btn {
  touch-action: manipulation;
  cursor: pointer;
}
.app-guide-tour-panel h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.app-guide-tour-panel p {
  margin: 0 0 12px;
  line-height: 1.45;
  color: #cbd5e1;
  font-size: 0.95rem;
}
.app-guide-tour-meta {
  font-size: var(--text-hint);
  color: #94a3b8;
  margin-bottom: 12px;
}
.app-guide-tour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.app-guide-tour-root.is-complete .app-guide-tour-backdrop {
  opacity: 1;
  background: rgba(2, 6, 23, 0.78);
}
.app-guide-tour-complete {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  pointer-events: auto;
}
.app-guide-tour-complete[hidden] {
  display: none !important;
}
.app-guide-tour-complete__card {
  max-width: 420px;
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.app-guide-tour-complete__card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}
.app-guide-tour-complete__card p {
  margin: 0 0 16px;
  line-height: 1.5;
  color: #cbd5e1;
}
.app-guide-tour-missing {
  border: 2px dashed #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #fcd34d;
}

@media (min-width: 769px) {
  .app-guide-tour-root:not(.has-spotlight) .app-guide-tour-panel {
    left: auto;
    right: 24px;
    bottom: 24px;
    top: auto;
  }
}

/* Anteprima moduli App in scheda condominio (tour guida) */
.condo-guide-demo-banner {
  padding: 10px 12px;
  margin: 0 0 14px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  font-size: 0.9rem;
  line-height: 1.45;
}
.condo-guide-demo-section {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}
.condo-guide-demo-card {
  opacity: 0.98;
}
[data-app-guide-work] [hidden] { display: none !important; }
[data-app-guide-contact] [hidden] { display: none !important; }
[data-app-guide-survey] [hidden] { display: none !important; }
/* Leave enough scroll room to reveal the last demo control above guide/dock. */
[data-app-guide-survey] { padding-bottom: 60vh; }
[data-app-guide-survey] .survey-participate-form + [data-survey-feedback] { margin-top: 24px; }
/* Only the guide sandbox follows the tour's native/tablet card mode here. */
html.cap-native [data-app-guide-work] .tickets-view-panel--table,
html.cap-native [data-app-guide-work] .tickets-list-toolbar { display: none !important; }
html.cap-native [data-app-guide-work] .tickets-view-panel--cards { display: block !important; }
html.cap-native [data-app-guide-work] .ticket-mobile-tabs { display: flex; }
html.cap-native [data-app-guide-work] .ticket-mobile-panel { display: none; }
html.cap-native [data-app-guide-work] .ticket-mobile-panel.is-active { display: block; }
[data-app-guide-board] [hidden], [data-app-guide-board-modal] [hidden] { display: none !important; }
[data-app-guide-board] { padding-bottom: 65vh; }
[data-app-guide-board-modal].has-guide-read-panel, [data-app-guide-hub-picker].has-guide-read-panel, [data-app-guide-booking-modal].has-guide-read-panel {
  align-items: flex-start !important;
  padding-top: var(--guide-read-top) !important;
  padding-bottom: 0 !important;
}
[data-app-guide-board-modal].has-guide-read-panel .modal-panel, [data-app-guide-booking-modal].has-guide-read-panel .modal-panel,
[data-app-guide-hub-picker].has-guide-read-panel .dash-mobile-hub-picker__panel {
  max-height: var(--guide-read-height);
  overflow-y: auto;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 0;
}
[data-app-guide-community] { padding-bottom: 65vh; }
[data-app-guide-profile] [hidden] { display: none !important; }
[data-app-guide-profile], [data-app-guide-portrait], [data-app-guide-home] { padding-bottom: 65vh; }
[data-app-guide-booking] { padding-bottom: 65vh; }
[data-app-guide-council-ticket], [data-app-guide-assembly], [data-app-guide-community-manage], [data-app-guide-parking] { padding-bottom: 65vh; }
[data-app-guide-council-ticket] [hidden], [data-app-guide-assembly] [hidden], [data-app-guide-community-manage] [hidden], [data-app-guide-parking] [hidden] { display: none !important; }
@media (max-width: 1024px) {
  [data-app-guide-council-ticket] .ticket-update-shell.is-open .ticket-update-sheet-card.has-guide-form-panel {
    top: var(--guide-form-top); bottom: auto; height: var(--guide-form-height); max-height: var(--guide-form-height); overflow: auto;
  }
}
html.cap-native [data-app-guide-council-ticket] .ticket-update-shell.is-open .ticket-update-sheet-card.has-guide-form-panel {
  top: var(--guide-form-top); bottom: auto; height: var(--guide-form-height); max-height: var(--guide-form-height); overflow: auto;
}
[data-app-guide-booking-manage] { padding-bottom: 65vh; }
[data-app-guide-booking-manage] [hidden] { display: none !important; }
[data-app-guide-booking-list] { padding-bottom: 65vh; }
[data-app-guide-booking-list] [hidden] { display: none !important; }
[data-app-guide-booking-list] button.scadenza-cal-link { background: none; border: 0; border-radius: 0; box-shadow: none; min-height: auto; padding: 0; font: inherit; cursor: pointer; }
[data-app-guide-booking-list] button.scadenza-cal-link:not(.inline-text-link) { color: #93c5fd; }
@media (max-width: 1024px) {
  [data-app-guide-booking-list] .tickets-list-root .tickets-view-panel--table,
  [data-app-guide-booking-list] .tickets-list-toolbar { display: none !important; }
  [data-app-guide-booking-list] .tickets-list-root .tickets-view-panel--cards { display: block !important; }
}
html.cap-native [data-app-guide-booking-list] .tickets-view-panel--table,
html.cap-native [data-app-guide-booking-list] .tickets-list-toolbar { display: none !important; }
html.cap-native [data-app-guide-booking-list] .tickets-view-panel--cards { display: block !important; }
@media (max-width: 1024px) {
  [data-app-guide-booking-manage] .tickets-list-root .tickets-view-panel--table,
  [data-app-guide-booking-manage] .tickets-list-toolbar { display: none !important; }
  [data-app-guide-booking-manage] .tickets-list-root .tickets-view-panel--cards { display: block !important; }
  html:not(.cap-native) [data-app-guide-booking-manage] .flip-card-swipe-actions { display: flex; }
  html:not(.cap-native) [data-app-guide-booking-manage] .flip-card-swipe-wrapper.is-swiped:has(.ticket-flip-card.is-flipped) > .ticket-flip-card { transform: translateX(calc(-1 * var(--swipe-w))) !important; }
}
html.cap-native [data-app-guide-booking-manage] .tickets-view-panel--table,
html.cap-native [data-app-guide-booking-manage] .tickets-list-toolbar { display: none !important; }
html.cap-native [data-app-guide-booking-manage] .tickets-view-panel--cards { display: block !important; }
[data-app-guide-booking] [hidden], [data-app-guide-booking-modal][hidden] { display: none !important; }
/* The existing dashboard media rule does not cover a wide native viewport. Demo only. */
html.cap-native [data-app-guide-home] .dashboard-mobile-layout { display: block; }
/* Guide fixtures must not wait for scroll-reveal animation under the spotlight. */
[data-app-guide-portrait] [data-reveal] { opacity: 1; transform: none; transition: none; }
