body.install-page {
  padding-top: 40px;
}

/* Stile identico a app-settings.php per consistenza */
body.theme-dark .form-text,
body.theme-dark .text-muted {
  color: #b9c2cf !important;
}

body.theme-dark #logo-info {
  background-color: #343a40 !important;
  border-color: #495057 !important;
  color: #fff !important;
}

body.theme-dark .alert-success {
  background-color: #155724 !important;
  border-color: #c3e6cb !important;
  color: #d4edda !important;
}

@media (max-width: 576px) {
  .container.page-install {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

.install-card {
  width: min(1380px, calc(100% - 2rem));
  max-width: none;
  margin: 0 auto;
}

.step-title {
  font-weight: 700;
  margin-top: 0.5rem;
}

.required:after {
  content: ' *';
  color: #dc3545;
}

.theme-dark .text-static-dark {
  color: #fff !important;
}

.logo-preview {
  max-height: 80px;
  margin-top: 10px;
}

.small-muted {
  font-size: 0.95rem;
  color: #6c757d;
}

.is-invalid {
  border-color: #dc3545 !important;
}

.install-step {
  display: none;
}

.install-step.active {
  display: block;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.step-indicator .step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step-indicator .step.active {
  color: #007bff;
  font-weight: bold;
}

.step-indicator .step.completed {
  color: #28a745;
}

.step-indicator .step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -50%;
  width: 100%;
  height: 2px;
  background-color: #dee2e6;
  z-index: -1;
}

.step-indicator .step:last-child::after {
  display: none;
}

.step-indicator .step.completed::after {
  background-color: #28a745;
}

/* Sistema logo avanzato identico a app-settings.php */
#logo-drop-zone {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
  margin-top: 10px;
}

#logo-drop-zone:hover {
  border-color: #007bff;
  background-color: #e3f2fd;
}

#logo-drop-zone.dragover {
  border-color: #007bff;
  background-color: #e3f2fd;
  transform: scale(1.02);
}

.logo-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .logo-controls {
    flex-direction: column;
  }
}

.install-app-logo {
  height: 40px;
  width: auto;
  vertical-align: middle;
}

.install-version {
  opacity: 0.85;
}

.install-build {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.14rem 0.45rem;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

@media (min-width: 1200px) {
  .install-step > .card > .card-body {
    padding: 1.25rem 1.5rem;
  }
}

.install-welcome-logo {
  max-width: 320px;
  height: auto;
}

.install-logo-preview {
  max-width: 200px;
  max-height: 200px;
}

.install-logo-info {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 10px;
}

.install-progress-bar {
  width: 0%;
}

.install-log-box {
  height: 300px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.9em;
}

/* Il wizard usa cinque famiglie distinte; su schermi stretti l'indicatore resta leggibile. */
.step-indicator {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.step-indicator .step {
  min-width: 100px;
}

.install-overview-item {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
}

.install-overview-item > i {
  color: var(--bs-primary, #0d6efd);
  font-size: 1.35rem;
}

.install-overview-item > span {
  color: var(--bs-secondary-color, #6c757d);
  font-size: 0.9rem;
}

.install-license-document {
  max-height: 20rem;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  color: inherit;
  background: var(--bs-tertiary-bg, #f8f9fa);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.install-license-document > :first-child {
  margin-top: 0;
}

.install-license-document > :last-child {
  margin-bottom: 0;
}

.install-license-document h1,
.install-license-document h2,
.install-license-document h3 {
  margin-top: 1.5rem;
}

.install-license-document code {
  color: inherit;
}

.install-license-document.is-error {
  color: var(--bs-danger, #dc3545);
}

@media (max-width: 575.98px) {
  .step-indicator {
    justify-content: flex-start;
    margin-inline: -0.5rem;
    padding: 0 0.5rem 0.5rem;
  }

  .step-indicator .step {
    min-width: 78px;
  }

  .step-indicator .step small {
    font-size: 0.7rem;
  }
}


.requirements-panel {
  padding: 1rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
}

.requirements-panel h5 {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.requirements-panel .list-group-item {
  background: transparent;
  color: inherit;
}

.requirements-panel .badge {
  max-width: 45%;
  white-space: normal;
  text-align: right;
  overflow-wrap: anywhere;
}

.requirements-panel-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.requirements-panel-toggle .requirements-chevron {
  transition: transform 0.2s ease;
}

.requirements-panel-toggle:not(.collapsed) .requirements-chevron {
  transform: rotate(180deg);
}

body.theme-dark.install-page {
  background: #0f1724;
  color: #e8eef8;
}

body.theme-dark.install-page > .install-card > .card,
body.theme-dark.install-page .install-step > .card,
body.theme-dark.install-page .modal-content {
  background: #182337;
  color: #e8eef8;
  border-color: #41516c;
}

body.theme-dark.install-page .requirements-panel {
  background: #111c2e;
  border-color: #41516c;
}

body.theme-dark.install-page .install-overview-item,
body.theme-dark.install-page .install-license-document {
  border-color: #41516c;
  background: #111c2e;
}

body.theme-dark.install-page .requirements-panel-toggle,
body.theme-dark.install-page .requirements-panel .list-group-item {
  color: #e8eef8;
}

body.theme-dark.install-page .alert-secondary {
  background: #26344a;
  border-color: #52647f;
  color: #edf3fc;
}

body.theme-dark.install-page .alert-danger {
  background: #491f2a;
  border-color: #a94458;
  color: #ffdce3;
}

body.theme-dark.install-page .alert-info {
  background: #12394a;
  border-color: #277793;
  color: #d9f4ff;
}

@media (max-width: 575.98px) {
  .requirements-panel {
    padding: 0.8rem;
  }

  .requirements-panel .list-group-item {
    flex-wrap: wrap;
  }

  .requirements-panel .badge {
    max-width: 100%;
    margin-left: 1.5rem;
    text-align: left;
  }
}
