body {
  font-family: Arial, sans-serif;
  font-size: 10pt;
  margin: 10px;
  background: #f5f5f5;
}

.app-container {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #f36f21;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
}

h1 {
  font-size: 16pt;
  margin: 0;
}

.fecha-selector {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.fecha {
  font-size: 9pt;
  color: #555;
  text-align: right;
}

#selector-fecha {
  padding: 4px 6px;
  font-size: 9pt;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 9pt;
  text-decoration: none;
  color: #fff;
  background: #1976d2;
}

.btn-whatsapp { background: #25d366; }
.btn-call { background: #f36f21; }
.btn-callo { background: #f10f12; }
.btn-print { background: #424242; margin-left: auto; }

.btn span.icon { font-size: 12pt; }

h2 {
  font-size: 12pt;
  margin: 12px 0 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 10px;
}

th, td {
  border-bottom: 0.5px solid #ddd;
  padding: 6px 4px;
  vertical-align: middle;
}

th {
  background: #fafafa;
  font-size: 9pt;
  text-align: left;
}

td.checkbox {
  width: 32px;
  text-align: center;
}

td.estacion {
  width: 40%;
  font-weight: bold;
  font-size: 10pt;
}

td.estacion a {
  color: #1976d2;
  text-decoration: none;
}

.btn-nota {
  margin-left: 6px;
  font-size: 10pt;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
}

.nota-estacion {
  width: 100%;
  margin-top: 6px;
  font-size: 9pt;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: none;
}

.nota-mostrada {
  margin-top: 6px;
  background: #f0f0f0;
  padding: 6px;
  border-radius: 6px;
  font-size: 9pt;
  color: #333;
  white-space: pre-wrap;
}

.incidencias-container {
  margin-top: 12px;
}

#incidencias-mostradas {
  margin-top: 10px;
  background: #f0f0f0;
  padding: 10px;
  border-radius: 6px;
  font-size: 10pt;
  white-space: pre-wrap;
}

tbody tr:nth-child(odd) { background-color: #fafafa; }
tbody tr:nth-child(even) { background-color: #ffffff; }

tr.hecho, tr.hecho td {
  background-color: #9fff9f !important;
}

tbody tr, tbody tr td {
  transition: background-color 0.35s ease;
}

/* Tema Applus */
.tema-applus header {
  border-bottom: 2px solid #f36f21;
}
.tema-applus .logo {
  background: #f36f21 !important;
}
.tema-applus .btn-call {
  background: #f36f21;
}
.tema-applus #progreso-barra {
  background: #f36f21;
}

/* Tema Tarragona */
.tema-tarragona header {
  border-bottom: 2px solid #1976d2;
}
.tema-tarragona .logo {
  background: #1976d2 !important;
}
.tema-tarragona .btn-call {
  background: #1976d2;
}
.tema-tarragona #progreso-barra {
  background: #1976d2;
}

.progreso-anim {
  animation: pop 0.25s ease;
}

@keyframes pop {
  0%   { transform: scale(0.85); opacity: 0.4; }
  70%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

.brillo {
  animation: brillo 1.2s ease-out;
}

@keyframes brillo {
  0%   { box-shadow: 0 0 0px rgba(255,255,255,0); }
  50%  { box-shadow: 0 0 12px rgba(255,255,255,0.9); }
  100% { box-shadow: 0 0 0px rgba(255,255,255,0); }
}

/* MODO COMPACTO PARA MÓVIL */
@media (max-width: 600px) {

  body {
    font-size: 9pt;
    margin: 6px;
  }

  .app-container {
    padding: 10px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .logo {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  h1 {
    font-size: 13pt;
  }

  #selector-fecha {
    font-size: 9pt;
    padding: 3px 5px;
  }

  .top-actions {
    gap: 4px;
  }

  .btn {
    padding: 5px 8px;
    font-size: 8pt;
  }

  table {
    font-size: 9pt;
  }

  th, td {
    padding: 4px 3px;
  }

  td.estacion {
    font-size: 9pt;
  }

  .btn-nota {
    padding: 1px 4px;
    font-size: 9pt;
  }

  .nota-estacion {
    font-size: 8pt;
    padding: 3px;
  }

  #progreso-container {
    height: 14px;
  }

  #progreso-barra {
    font-size: 8pt;
  }

  textarea {
    font-size: 9pt;
  }
}
