/* ===== Estilo base ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: url("assets/xFwpx9C_signed.png") no-repeat center center fixed;
  background-size: cover;
}

/* Contenedor */
#app {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Header */
header { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; }
header h1 { margin: 0; font-size: 28px; }

/* Select idioma */
#languageSelect { padding: 6px 8px; border-radius: 6px; border: 1px solid #cfcfcf; }

/* Formularios */
form label { display: block; margin-top: 10px; }
form select, form input, form textarea {
  width: 100%; padding: 8px 10px; margin-top: 6px; border-radius: 6px; border: 1px solid #ccc; box-sizing: border-box;
}

/* Botones principales */
#btn-calcular, #btn-guardar {
  margin-top: 14px; width: 100%;
  background-color: #28a745; color: #fff; border: none; padding: 10px 12px;
  font-size: 16px; border-radius: 8px; cursor: pointer;
}
#btn-guardar { background-color: #007bff; }
#btn-calcular:hover { background-color: #218838; }
#btn-guardar:hover { background-color: #0056b3; }

/* Resultado / advertencia */
#calc-resultado { margin-top: 10px; font-weight: bold; }
.advertencia { display: block; margin-top: 6px; font-size: 12px; color: #b00020; font-style: italic; }

/* Historial */
#historial { margin-top: 14px; }
.historial-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px; border-radius: 8px; background: rgba(250,250,250,0.95);
  margin-bottom: 10px; box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.historial-btns { display: flex; gap: 6px; }
.historial-btns button {
  padding: 6px 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 12px;
}
.historial-btns .edit { background-color: #ffc107; color: #111; }
.historial-btns .delete { background-color: #dc3545; color: #fff; }
.historial-btns .edit:hover { background-color: #e0a800; }
.historial-btns .delete:hover { background-color: #c82333; }

/* ========================= */
/*   Tabs + Seguimiento      */
/* ========================= */

/* Tabs */
#tabs { display:flex; gap:8px; margin:10px 0 16px; flex-wrap:wrap; }
#tabs .tab-btn {
  cursor: pointer; padding: 8px 14px; border-radius: 6px;
  border: 1px solid #ccc; background: #fff;
}
#tabs .tab-btn.active { background: #28a745; color:#fff; border-color: #28a745; }

/* Seguimiento */
.seg-row { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.seg-stats div { margin: 4px 0; }

.seg-progress { margin: 12px 0; }
.seg-bar { height: 12px; background: #eee; border: 1px solid #ccc; border-radius: 999px; overflow:hidden; }
#progress-fill { height:100%; width:0%; background:#28a745; transition: width .3s ease; }
#progress-label { display:block; margin-top:6px; font-size:12px; }

.seg-actions { display:flex; gap:10px; margin:10px 0; flex-wrap:wrap; }
.seg-actions button { padding: 8px 12px; border:1px solid #ccc; border-radius:6px; background:#fff; cursor:pointer; }

.seg-list .day-item {
  display: grid; grid-template-columns: auto 120px 1fr auto;
  gap: 10px; align-items:center; padding: 8px; border-bottom: 1px solid #eee;
}
.day-item .date { font-weight: 600; }
.day-item .phase {
  font-size: 12px; padding: 2px 6px; border-radius: 999px;
  background: #f5f5f5; border: 1px solid #ddd;
}
.day-item .note { font-size: 12px; color:#555; }
.day-item .actions button {
  background: transparent; border:1px solid #ccc; padding:4px 6px; border-radius:4px; cursor:pointer;
}
.day-item.taken { background: #e6f4ea; }

@media (max-width: 720px){
  .seg-row { grid-template-columns: 1fr; }
  .seg-list .day-item { grid-template-columns: auto 1fr; }
}



