/* Reset básico */
* {
  box-sizing: border-box;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  margin: 0;
  background-color: #f3f4f6;
  padding: 1rem;
  color: #1f2937;
}

.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

h1, h2 {
  margin-bottom: 1rem;
  font-weight: 700;
}

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
  padding: 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  width: 100%;
  font-size: 1rem;
  color: #374151;
  transition: border-color 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

button {
  grid-column: 1 / -1;
  background-color: #3b82f6;
  color: white;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease-in-out;
}

button:hover {
  background-color: #2563eb;
}

.table-container {
  overflow-x: auto;
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

th,
td {
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  text-align: left;
  font-size: 0.9rem;
  vertical-align: middle;
}

th {
  background-color: #f9fafb;
  font-weight: 700;
}

.flex-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-red {
  background-color: #ef4444;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.2s ease-in-out;
}

.btn-red:hover {
  background-color: #b91c1c;
}

.btn-green {
  background-color: #16a34a;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.2s ease-in-out;
}

.btn-green:hover {
  background-color: #166534;
}

#syncEstado {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

#ultimaSync {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

textarea,
select {
  padding: 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  width: 100%;
  font-size: 1rem;
  color: #374151;
  transition: border-color 0.2s ease-in-out;
  font-family: inherit;
  background-color: white;
}

/* Foco igual que los input */
textarea:focus,
select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Opcional: control del tamaño del textarea */
textarea {
  resize: vertical;
  min-height: 2.5rem; /* o 80px como tenías antes */
}

/* Opcional: apariencia moderna del select */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='%236b7280' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.939l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
  padding-right: 2rem;
}

/*******************************/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.modal-content .btn-blue,
.modal-content .btn-green {
  margin: 0.5rem;
}

.modal-content .close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/************************************************/

.hidden {
  display: none;
}

.modal {
  z-index: 1000;
}

.btn-blue {
  background-color: #3b82f6;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
}

.btn-green {
  background-color: #10b981;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
}

.btn-red {
  background-color: #ef4444;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
}
