/* Componentes reutilizables: tarjetas, botones, chips, campos, modal, toast y pestañas. */

.iconBtn {
  border: 0;
  background: #e2f6f2;
  border-radius: 13px;
  padding: 10px 12px;
  color: #076b68;
}

.card {
  background: white;
  border: 1px solid #e7eeee;
  border-radius: 20px;
  padding: 17px;
  box-shadow: 0 3px 15px #14374606;
  margin-bottom: 13px;
}

.chip {
  display: inline-block;
  background: #dcf5ec;
  color: #15816a;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.warning {
  background: #fff2d7;
  color: #946a13;
}

.danger {
  background: #fee7e6;
  color: #b64848;
}

.btn {
  border: 0;
  border-radius: 13px;
  background: var(--teal);
  color: #fff;
  font-weight: 750;
  padding: 12px 15px;
}

.btn.secondary {
  background: #e7f5f3;
  color: #087d77;
}

.btn.ghost {
  background: #f1f5f5;
  color: var(--dark);
}

.btn.danger {
  background: #ffe7e6;
  color: #ad3939;
}

.btn.sm {
  padding: 8px 10px;
  font-size: 12px;
}

.item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.item:last-child {
  border-bottom: 0;
}

.item b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #cbdcdb;
  border-radius: 16px;
}

.field {
  display: grid;
  gap: 5px;
  margin: 11px 0;
}

.field label {
  font-size: 12px;
  font-weight: 800;
  color: #556c74;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d8e4e5;
  border-radius: 12px;
  background: white;
  padding: 12px;
  color: #163342;
  min-width: 0;
}

.field textarea {
  min-height: 75px;
  resize: vertical;
}

.field input[type="date"][aria-invalid="true"] {
  border-color: #c53f42;
  background: #fffafa;
  outline-color: #c53f42;
}

.dateError {
  font-size: 12px;
  color: #b12f39;
  line-height: 1.4;
}

.dateError[hidden] {
  display: none;
}

.formGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.full {
  grid-column: 1/-1;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}

.actions>* {
  flex: 1;
}

.statGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  border-radius: 16px;
  padding: 15px;
  background: #eff7f7;
}

.stat strong {
  display: block;
  font-size: 23px;
  margin-top: 5px;
}

.modal {
  position: fixed;
  inset: 0;
  background: #112b3580;
  z-index: 10;
  display: grid;
  place-items: end center;
  padding: 0;
}

.sheet {
  width: min(560px,100%);
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 21px 18px 30px;
  max-height: 88dvh;
  overflow: auto;
  box-shadow: 0 -10px 40px #0002;
}

.sheet h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.toast {
  position: fixed;
  bottom: 87px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 15px;
  border-radius: 12px;
  background: #1b4245;
  color: white;
  font-size: 13px;
  z-index: 30;
  max-width: 90%;
  text-align: center;
}

.tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.tabs button {
  border: 0;
  border-radius: 30px;
  padding: 9px 12px;
  background: #eaf1f2;
  color: #4b6e74;
  white-space: nowrap;
}

.tabs button.active {
  background: var(--teal);
  color: white;
}

.bar {
  height: 9px;
  background: #e6eeee;
  border-radius: 30px;
  overflow: hidden;
}

.bar>div {
  background: var(--teal);
  height: 100%;
}

.pill {
  display: inline-block;
  border-radius: 100px;
  background: #edf6f5;
  font-size: 12px;
  padding: 6px 10px;
  margin: 3px;
}
