* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f2f4f7;
  color: #1f2937;
}

header {
  background: #1e3a8a;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.2rem;
}

main {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 16px;
}

.tarjeta {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 800px) {
  .columnas {
    grid-template-columns: 1fr;
  }
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #374151;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}

textarea {
  font-family: monospace;
}

button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 4px;
}

button:hover {
  background: #1d4ed8;
}

button.secundario {
  background: #6b7280;
}

button.secundario:hover {
  background: #4b5563;
}

button.liberar {
  background: #dc2626;
}

button.liberar:hover {
  background: #b91c1c;
}

button.oculto {
  display: none;
}

.oculto {
  display: none;
}

.error {
  color: #dc2626;
  font-size: 0.85rem;
}

.item-cliente {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.item-cliente .cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.item-cliente h4 {
  margin: 0;
}

.item-cliente .datos {
  font-size: 0.85rem;
  color: #4b5563;
}

.item-cliente .acciones {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 8px;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}

th {
  background: #f9fafb;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.badge.ok {
  background: #d1fae5;
  color: #065f46;
}

.badge.no {
  background: #fee2e2;
  color: #991b1b;
}

.badge.aviso {
  background: #fef3c7;
  color: #92400e;
}

.botonera {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.dialogo {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
  z-index: 10;
}

.dialogo .tarjeta {
  max-width: 560px;
  width: 100%;
}
