/* === BASE STYLES (ridotti del 90%) === */
body {
  background-color: #f4f6f9;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: #333;
}

h1, h2, h3, h4 {
  font-weight: 600;
  color: #0070C0;
  font-size: 90%;
}

header {
  background-color: #0070C0;
  color: white;
  padding: 18px;
  font-size: 1.44rem;
  text-align: center;
  border-radius: 0 0 13.5px 13.5px;
  margin-bottom: 27px;
}

/* === SIDEBAR === */
.sidebar-section {
  background-color: #ffffff;
  padding: 14.4px;
  margin-bottom: 18px;
  border-radius: 10.8px;
  box-shadow: 0 1.8px 7.2px rgba(0, 0, 0, 0.04);
}

.sidebar-section-title {
  font-size: 1.08rem;
  color: #0070C0;
  margin-bottom: 9px;
}

/* === INPUTS === */
input[type="text"],
input[type="password"],
textarea,
select {
  border-radius: 7.2px;
  border: 1px solid #ccc;
  padding: 9px;
  font-size: 0.9rem;
  background-color: #fff;
  transition: border 0.2s ease-in-out;
  margin-bottom: 10.8px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #0070C0;
  outline: none;
  box-shadow: 0 0 0 0.09rem rgba(0,112,192,0.2);
}

/* === BUTTONS === */
button.btn,
.action-button,
.shiny-download-link {
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 9px;
  padding: 9px 12.6px;
  border: none;
  width: 100%;
  margin-bottom: 9px;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7.2px;
  text-decoration: none;
}

/* === Download Button (blu) === */
.shiny-download-link {
  background-color: #0070C0;
  color: white;
  box-shadow: 0 1.8px 5.4px rgba(0, 112, 192, 0.2);
}

.shiny-download-link:hover {
  background-color: #005a9c;
  box-shadow: 0 3.6px 9px rgba(0, 112, 192, 0.3);
}

/* === Esci Button (rosso tenue) === */
#btn_gen_st_esc {
  background-color: #dc3545;
  color: white;
  box-shadow: 0 1.8px 5.4px rgba(220, 53, 69, 0.2);
}

#btn_gen_st_esc:hover {
  background-color: #c82333;
  box-shadow: 0 3.6px 9px rgba(220, 53, 69, 0.3);
}

/* === GENERIC ACTION BUTTON === */
.action-button:not(#btn_gen_st_esc):not(.shiny-download-link) {
  background-color: #0070C0;
  color: white;
  box-shadow: 0 1.8px 5.4px rgba(0, 112, 192, 0.2);
}

.action-button:hover:not(#btn_gen_st_esc):not(.shiny-download-link) {
  background-color: #005a9c;
  box-shadow: 0 3.6px 9px rgba(0, 112, 192, 0.3);
}

/* === TABLES === */
.dataTables_wrapper {
  background-color: white;
  padding: 13.5px;
  border-radius: 10.8px;
  box-shadow: 0 1.8px 7.2px rgba(0,0,0,0.04);
}

table.dataTable {
  font-size: 0.855rem;
  color: #333;
  border-collapse: collapse;
}

table.dataTable th {
  background-color: #E6F2FA;
  color: #0070C0;
  font-weight: 600;
  padding: 9px;
  text-align: left;
}

table.dataTable td {
  background-color: #ffffff;
  padding: 7.2px;
  border-top: 1px solid #eaeaea;
}

/* === VIDEO === */
video {
  border-radius: 9px;
  box-shadow: 0 1.8px 5.4px rgba(0,0,0,0.08);
}

/* === MISC === */
hr {
  border-top: 1px solid #e0e0e0;
  margin: 18px 0;
}

.spinner-border {
  color: #0070C0 !important;
}

/* === INFO BUTTONS (icone con larghezza minima) === */
.action-link, .btn-info, #info_fasi, #info_home, #info_video, #info_modifiche {
  background-color: transparent;
  border: none;
  color: #0070C0;
  padding: 3.6px 5.4px;
  font-size: 0.9rem;
  border-radius: 5.4px;
  width: auto;
  min-width: 32.4px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.action-link:hover, .btn-info:hover,
#info_fasi:hover, #info_home:hover, #info_video:hover, #info_modifiche:hover {
  background-color: #e6f2fa;
  color: #005a9c;
  cursor: pointer;
}

/* === Download Button disabilitato === */
.shiny-download-link:disabled,
.shiny-download-link[disabled],
.shiny-download-link.disabled {
  background-color: #b0cce6;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
  pointer-events: none;
}
