* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f5f7;
  margin: 0;
  padding: 24px;
  color: #1f2329;
}

.container {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.btn-key {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #f9fafb;
  font-size: 16px;
  cursor: pointer;
}

.btn-key:hover {
  background: #f3f4f6;
}

.export-popover {
  position: absolute;
  top: 56px;
  right: 16px;
  width: 220px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 14px;
  z-index: 10;
}

.export-popover.hidden {
  display: none;
}

.export-popover label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.export-popover input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 10px;
}

.export-popover-actions {
  display: flex;
  gap: 6px;
}

.export-popover-actions button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

#btn-clave-confirmar {
  background: #2563eb;
  color: #fff;
}

#btn-clave-confirmar:hover {
  background: #1d4ed8;
}

.btn-secundario {
  background: #f3f4f6;
  color: #374151;
}

.btn-secundario:hover {
  background: #e5e7eb;
}

.export-popover .mensaje {
  margin: 8px 0 0;
}

h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

.subtitle {
  margin: 0 0 24px;
  color: #6b7280;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.dias {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dia-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
}

.dia-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dia-label {
  font-size: 14px;
  font-weight: 600;
}

.btn-add-bloque {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.btn-add-bloque:hover {
  text-decoration: underline;
}

.bloques {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bloque-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr 28px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.bloque-row input[type="time"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
}

.bloque-sep {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.btn-remove-bloque {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.btn-remove-bloque:hover {
  background: #fee2e2;
}

.mensaje {
  min-height: 20px;
  font-size: 14px;
  margin-bottom: 8px;
}

.mensaje.error {
  color: #dc2626;
}

.mensaje.ok {
  color: #16a34a;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: #1d4ed8;
}

